This commit is contained in:
2022-02-24 09:36:18 +08:00
30 changed files with 273 additions and 254 deletions

View File

@@ -2,8 +2,8 @@
"name" : "ZH-HEALTH",
"appid" : "__UNI__C29473D",
"description" : "ZH-HEALTH您手上的健康管理专家",
"versionName" : "1.0.15",
"versionCode" : 113,
"versionName" : "1.0.16",
"versionCode" : 100,
"transformPx" : false,
/* 5+App */
"app-plus" : {

View File

@@ -1,7 +1,7 @@
<template>
<view class="apply--cell">
<view class="avatar">
<u-avatar :src="user.portraitUrl || require('@/static/user/cover.png')" shape="square" size="46" />
<u-avatar :src="user.portraitUrl || require('@/static/user/cover.png')" shape="square" :size="avatarSize" />
</view>
<view class="info">
<view class="name"> {{ user.name }}</view>
@@ -20,8 +20,12 @@
resolveFriend,
rejectFriend
} from '@/apis/interfaces/im.js'
import imBase from '../mixins/imBase.js'
export default {
mixins: [
imBase
],
props: {
message: {
type: Object,

View File

@@ -3,7 +3,7 @@
<block v-for="(item, index) in lists" v-if="lists.length > 0" :key="index">
<view class="lists">
<view class="" style="width: 100rpx;height: 100rpx;">
<u-avatar :src="JSON.parse(item.latestMessage.extra).portraitUrl" shape="square" size="44" />
<u-avatar :src="JSON.parse(item.latestMessage.extra).portraitUrl" shape="square" :size="avatarSize" />
</view>
<view class="right">
<view class="title">
@@ -14,7 +14,8 @@
<span v-if="isAgree" @click="action('agree', item)">通过</span>
<span v-if="isAgree" @click="action('reject', item)">拒绝</span>
<span v-if="isApply && !item.is_friend" @click="action('apply', item)">查看</span>
<span class="isFri" v-if="isApply && item.is_friend" @click="action('isFriend', item)">已是好友</span>
<span class="isFri" v-if="isApply && item.is_friend"
@click="action('isFriend', item)">已是好友</span>
</view>
</view>
</view>
@@ -23,104 +24,124 @@
</template>
<script>
export default {
name: 'friend-apply-reject-agree',
props: {
lists: {
type: Array,
default: []
},
isAgree: {
type: Boolean,
default: false
},
isReject: {
type: Boolean,
default: false
},
isApply: {
type: Boolean,
default: false
}
},
created() {
console.log(this.lists);
},
methods: {
action(type, item) {
if (type === 'isFriend') {
// ,后期可以跳转到信息介绍页面,先留在这里
return uni.showToast({ title: '已是好友,无需重复添加', icon: 'none', duration:2000});
import imBase from '../mixins/imBase.js'
export default {
mixins:[
imBase
],
name: 'friend-apply-reject-agree',
props: {
lists: {
type: Array,
default: []
},
isAgree: {
type: Boolean,
default: false
},
isReject: {
type: Boolean,
default: false
},
isApply: {
type: Boolean,
default: false
}
},
created() {
console.log(this.lists);
},
methods: {
action(type, item) {
if (type === 'isFriend') {
// ,后期可以跳转到信息介绍页面,先留在这里
return uni.showToast({
title: '已是好友,无需重复添加',
icon: 'none',
duration: 2000
});
}
this.$emit('action', {
type,
item
});
}
this.$emit('action', { type, item });
}
}
};
};
</script>
<style lang="scss" scoped>
.lists {
padding: 0 $padding;
display: flex;
flex-direction: row;
align-items: center;
justify-content: flex-start;
box-sizing: border-box;
font-size: $title-size;
color: $text-gray;
.cover {
background-color: #ffffff;
}
.right {
width: 570rpx;
margin-left: $margin - 10;
.lists {
padding: 0 $padding;
display: flex;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: $padding 0;
border-bottom: solid 1rpx #f9f9f9;
.title {
width: 370rpx;
.name {
width: 100%;
color: $text-color;
font-size: $title-size + 2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.des {
width: 100%;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: $title-size-m;
margin-top: $margin - 10;
color: $text-gray-m;
}
justify-content: flex-start;
box-sizing: border-box;
font-size: $title-size;
color: $text-gray;
.cover {
background-color: #ffffff;
}
.agress-btn {
.right {
width: 570rpx;
margin-left: $margin - 10;
display: flex;
color: #fff;
font-size: $title-size-m;
span {
display: inline-block;
padding: 6rpx 14rpx;
background-color: $text-price;
border-radius: 10rpx;
flex-direction: row;
align-items: center;
justify-content: space-between;
padding: $padding 0;
border-bottom: solid 1rpx #f9f9f9;
.title {
width: 370rpx;
.name {
width: 100%;
color: $text-color;
font-size: $title-size + 2;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.des {
width: 100%;
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
font-size: $title-size-m;
margin-top: $margin - 10;
color: $text-gray-m;
}
}
span:nth-child(1) {
background-color: $main-color;
margin-right: 10rpx;
}
.isFri {
background-color: #f9f9f9 !important;
color: #666;
.agress-btn {
display: flex;
color: #fff;
font-size: $title-size-m;
span {
display: inline-block;
padding: 6rpx 14rpx;
background-color: $text-price;
border-radius: 10rpx;
}
span:nth-child(1) {
background-color: $main-color;
margin-right: 10rpx;
}
.isFri {
background-color: #f9f9f9 !important;
color: #666;
}
}
}
}
}
</style>

View File

@@ -3,7 +3,7 @@
<block v-for="(item, index) in lists" v-if="lists.length > 0" :key="index">
<view class="lists">
<view class="" style="width: 100rpx;height: 100rpx;">
<u-avatar :src="item.portraitUrl || require('@/static/user/cover.png')" shape="square" size="44" />
<u-avatar :src="item.portraitUrl || require('@/static/user/cover.png')" shape="square" :size="avatarSize" />
</view>
<view class="right">
<view class="title">
@@ -21,7 +21,12 @@
</template>
<script>
import imBase from '../mixins/imBase.js'
export default {
mixins: [
imBase
],
name: 'friend-apply-reject-agree',
props: {
lists: {

View File

@@ -38,7 +38,7 @@
transferGroupOwner
} from '@/apis/interfaces/im.js'
import utils from '@/utils/index.js'
import imBase from '@/utils/im/imBase.js'
import imBase from '../mixins/imBase.js'
export default {
mixins: [

View File

@@ -21,7 +21,7 @@
<script>
import messagePreview from './messagePreview'
import utils from '@/utils/index.js'
import imBase from '@/utils/im/imBase.js'
import imBase from '../mixins/imBase.js'
export default {
mixins: [

View File

@@ -34,8 +34,12 @@
<script>
import im from '@/utils/im/index.js'
import * as CallLib from '@/uni_modules/RongCloud-CallWrapper/lib/index'
import imBase from '../mixins/imBase.js'
export default {
mixins: [
imBase
],
data() {
return {
callActions: [{
@@ -64,15 +68,11 @@
default: ''
}
},
computed: {
sender() {
return this.$store.getters.sender
}
},
methods: {
singleCall(e) {
uni.navigateTo({
url: '/pages/im/private/call?targetId=' + this.targetId + '&mediaType=' + e.type + '&isCall=true'
url: '/pages/im/private/call?targetId=' + this.targetId + '&mediaType=' + e.type +
'&isCall=true'
})
},
onPopupsItem(type) {
@@ -144,6 +144,7 @@
display: flex;
flex-wrap: wrap;
flex-direction: row;
.item {
width: 150rpx;
margin: 15rpx;

View File

@@ -8,8 +8,12 @@
<script>
import im from '@/utils/im/index.js'
import * as RongIMLib from '@/uni_modules/RongCloud-IMWrapper/js_sdk/index'
import imBase from '../mixins/imBase.js'
export default {
mixins: [
imBase
],
props: {
conversationType: {
type: Number,
@@ -23,9 +27,6 @@
computed: {
disabled() {
return this.inputTxt.length === 0
},
sender() {
return this.$store.getters.sender
}
},
mounted() {

View File

@@ -14,8 +14,12 @@
<script>
import im from '@/utils/im/index.js'
import permision from '@/utils/permission.js'
import imBase from '../mixins/imBase.js'
export default {
mixins: [
imBase
],
props: {
conversationType: {
type: Number,
@@ -35,11 +39,6 @@
recorderManager: null
}
},
computed: {
sender() {
return this.$store.getters.sender
}
},
created() {
this.recorderManager = uni.getRecorderManager()
},
@@ -110,6 +109,7 @@
width: 500rpx;
border-radius: 10rpx;
margin-right: 15rpx;
.button {
font-size: 30rpx;
color: #333;
@@ -129,6 +129,7 @@
flex-direction: column;
align-items: center;
justify-content: center;
.icon {
width: 88rpx;
height: 88rpx;

View File

@@ -11,8 +11,12 @@
<script>
import utils from '@/utils/index.js'
import moment from 'moment'
import imBase from '../../mixins/imBase.js'
export default {
mixins: [
imBase
],
name: 'showText',
props: {
message: {
@@ -38,11 +42,6 @@
isRemote() {
return this.message.messageDirection == 2
},
contact() {
return function(targetId) {
return this.$store.getters.contactInfo(targetId)
}
},
duration() {
if (this.message.duration > 3600) {
return moment.utc(this.message.duration * 1000).format('HH:mm:ss')

View File

@@ -14,8 +14,12 @@
<script>
import * as RongIMLib from '@/uni_modules/RongCloud-IMWrapper/js_sdk/index'
import messageState from './messageState'
import imBase from '../../mixins/imBase.js'
export default {
mixins: [
imBase
],
name: 'showImage',
props: {
message: {
@@ -38,11 +42,6 @@
},
content() {
return this.message.content
},
contact() {
return function(targetId) {
return this.$store.getters.contactInfo(targetId)
}
}
},
methods: {

View File

@@ -11,6 +11,7 @@
<script>
import messageState from './messageState'
import imBase from '../../mixins/imBase.js'
export default {
name: 'showText',
@@ -35,11 +36,6 @@
},
content() {
return this.message.content.content
},
contact() {
return function(targetId) {
return this.$store.getters.contactInfo(targetId)
}
}
}
}

View File

@@ -23,6 +23,7 @@
<script>
import * as RongIMLib from '@/uni_modules/RongCloud-IMWrapper/js_sdk/index'
import messageState from './messageState'
import imBase from '../../mixins/imBase.js'
export default {
props: {
@@ -54,11 +55,6 @@
isRemote() {
return this.message.messageDirection == 2
},
contact() {
return function(targetId) {
return this.$store.getters.contactInfo(targetId)
}
},
width() {
if (this.duration > 3) {
return (this.duration * 5) + 150

View File

@@ -32,7 +32,7 @@
import showText from './show/showText'
import showCall from './show/showCall'
import utils from '@/utils/index.js'
import imBase from '@/utils/im/imBase.js'
import imBase from '../mixins/imBase.js'
export default {
mixins: [
@@ -72,7 +72,7 @@
toAnnounce(targetId) {
if (targetId) {
uni.navigateTo({
url: '/pages/im/group/announceCreate?targetId=' + this.targetId
url: '/pages/im/group/announceCreate?type=check&targetId=' + this.targetId
})
} else {
uni.showToast({

View File

@@ -39,7 +39,7 @@
} from '@/apis/interfaces/im';
import * as RongIMLib from '@/uni_modules/RongCloud-IMWrapper/js_sdk/index'
import im from '@/utils/im/index.js'
import imBase from '@/utils/im/imBase.js'
import imBase from '../mixins/imBase.js'
export default {
mixins: [

View File

@@ -23,7 +23,8 @@
<script>
import {
getUserInfo
} from '@/apis/interfaces/im'
} from '@/apis/interfaces/im.js'
export default {
data() {
return {

View File

@@ -43,7 +43,7 @@
methods: {
getPendingList() {
im.getPendingList((pendings) => {
console.log(pendings,'res......')
console.log(pendings, 'res......')
if (pendings.length > 0) {
this.bg = '#f9f9f9'
} else {

View File

@@ -32,6 +32,7 @@
pedingFriend
} from '@/apis/interfaces/im.js';
import applyFriend from '../components/friendSearchList.vue';
export default {
components: {
applyFriend

View File

@@ -16,7 +16,7 @@
createGroupAnnouncement,
getGroupAnnouncement
} from '@/apis/interfaces/im.js'
import onGroupDismiss from '@/utils/im/onGroupDismiss.js'
import onGroupDismiss from '../mixins/onGroupDismiss.js'
export default {
mixins: [

View File

@@ -35,8 +35,8 @@
deleteGroupAnnouncement,
topGroupAnnouncement
} from '@/apis/interfaces/im.js'
import onGroupDismiss from '@/utils/im/onGroupDismiss.js'
import imBase from '@/utils/im/imBase.js'
import onGroupDismiss from '../mixins/onGroupDismiss.js'
import imBase from '../mixins/imBase.js'
export default {
mixins: [

View File

@@ -20,8 +20,8 @@
joinGroupPre,
joinGroup
} from '@/apis/interfaces/im.js'
import onGroupDismiss from '@/utils/im/onGroupDismiss.js'
import imBase from '@/utils/im/imBase.js'
import onGroupDismiss from '../mixins/onGroupDismiss.js'
import imBase from '../mixins/imBase.js'
export default {
mixins: [

View File

@@ -21,8 +21,8 @@
import sentMessageBar from '../components/sentMessageBar'
import showMessageCell from '../components/showMessageCell'
import utils from '@/utils/index.js'
import onGroupDismiss from '@/utils/im/onGroupDismiss.js'
import imBase from '@/utils/im/imBase.js'
import onGroupDismiss from '../mixins/onGroupDismiss.js'
import imBase from '../mixins/imBase.js'
export default {
mixins: [

View File

@@ -57,8 +57,8 @@
} from '@/apis/interfaces/uploading'
import * as RongIMLib from '@/uni_modules/RongCloud-IMWrapper/js_sdk/index'
import groupUserList from '../components/groupUserList'
import onGroupDismiss from '@/utils/im/onGroupDismiss.js'
import imBase from '@/utils/im/imBase.js'
import onGroupDismiss from '../mixins/onGroupDismiss.js'
import imBase from '../mixins/imBase.js'
export default {
components: {

View File

@@ -47,7 +47,7 @@
import utils from '@/utils/index.js'
import onGroupDismiss from '@/utils/im/onGroupDismiss.js'
import * as RongIMLib from '@/uni_modules/RongCloud-IMWrapper/js_sdk/index'
import imBase from '@/utils/im/imBase.js'
import imBase from '../mixins/imBase.js'
export default {
mixins: [

View File

@@ -34,8 +34,8 @@
} from "@/apis/interfaces/im.js"
import im from '@/utils/im/message.js'
import * as RongIMLib from '@/uni_modules/RongCloud-IMWrapper/js_sdk/index'
import onGroupDismiss from '@/utils/im/onGroupDismiss.js'
import imBase from '@/utils/im/imBase.js'
import onGroupDismiss from '../mixins/onGroupDismiss.js'
import imBase from '../mixins/imBase.js'
export default {
mixins: [

View File

@@ -4,7 +4,7 @@
<script>
import groupUserList from '../components/groupUserList'
import onGroupDismiss from '@/utils/im/onGroupDismiss.js'
import onGroupDismiss from '../mixins/onGroupDismiss.js'
export default {
mixins: [

View File

@@ -46,7 +46,8 @@
return {
conversations: [], // 会话列表
connection: 0,
hasNewFriends: 0
hasNewFriends: 0,
perPage: 200
}
},
components: {
@@ -101,9 +102,7 @@
},
// 获取会话列表,最新的一千条
getConversationList() {
const count = 200
const timestamp = 0
RongIMLib.getConversationList([1, 3], count, timestamp, ({
RongIMLib.getConversationList([1, 3], this.perPage, 0, ({
code,
conversations
}) => {

View File

@@ -1,13 +1,9 @@
import utils from '@/utils/index.js'
const imBase = {
onLoad() {
console.log('IM BASE MININX');
},
export default {
onLoad() {},
data() {
return {
}
return {}
},
computed: {
contact() {
@@ -17,8 +13,9 @@ const imBase = {
},
avatarSize() {
return utils.rpx2px(84)
},
sender() {
return this.$store.getters.sender
}
}
}
export default imBase

View File

@@ -1,5 +1,5 @@
// 监听群解散的消息,直接跳转到会话列表页面
const onGroupDismiss = {
export default {
data() {
return {
currentTargetId: ''
@@ -32,5 +32,3 @@ const onGroupDismiss = {
uni.$off('onGroupRemoveYou_' + this.currentTargetId)
}
}
export default onGroupDismiss

View File

@@ -18,7 +18,7 @@
import sentMessageBar from '../components/sentMessageBar'
import showMessageCell from '../components/showMessageCell'
import utils from '@/utils/index.js'
import imBase from '@/utils/im/imBase.js'
import imBase from '../mixins/imBase.js'
export default {
mixins: [