Merge branch 'master' of https://git.yuzhankeji.cn/TmOct5/ZhHealth
This commit is contained in:
@@ -85,10 +85,13 @@ const searchFriend = (value) => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const pedingFriend = (recipient) => {
|
const pedingFriend = (recipient, message) => {
|
||||||
return request({
|
return request({
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
url: 'im/friends/' + recipient
|
url: 'im/friends/' + recipient,
|
||||||
|
data: {
|
||||||
|
message
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
bg-color="#fff"></u-avatar>
|
bg-color="#fff"></u-avatar>
|
||||||
<view class="info-text">
|
<view class="info-text">
|
||||||
<view class="nickname">{{ userInfo.name }}</view>
|
<view class="nickname">{{ userInfo.name }}</view>
|
||||||
<view class="address" @longpress="copyAddress">Hash:{{ userInfo.address }}</view>
|
<view class="address" @longpress="copyAddress">地址:{{ userInfo.address }}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 用户资料 -->
|
<!-- 用户资料 -->
|
||||||
@@ -106,7 +106,8 @@
|
|||||||
name: '视频通话'
|
name: '视频通话'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
callShow: false
|
callShow: false,
|
||||||
|
hasPeding: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(e) {
|
onLoad(e) {
|
||||||
@@ -201,36 +202,35 @@
|
|||||||
},
|
},
|
||||||
// 申请好友
|
// 申请好友
|
||||||
toBeFriend() {
|
toBeFriend() {
|
||||||
pedingFriend(this.targetId).then(res => {
|
if (this.hasPeding) {
|
||||||
|
uni.showToast({
|
||||||
|
icon: 'none',
|
||||||
|
title: '请不要频繁操作'
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
pedingFriend(this.targetId, 'message').then(res => {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: ` 申请成功,等待审核 `,
|
title: ` 申请成功,等待审核 `,
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 3000,
|
duration: 3000,
|
||||||
mask: true
|
mask: true
|
||||||
});
|
});
|
||||||
|
this.hasPeding = true
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
// if(err.status_code === 6001){
|
|
||||||
// this.userInfo.friendship = 'accepted'
|
|
||||||
// }else{
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
icon: 'error',
|
icon: 'error',
|
||||||
title: err.message,
|
title: err.message,
|
||||||
duration: 2000,
|
duration: 2000,
|
||||||
mask: true
|
mask: true
|
||||||
})
|
})
|
||||||
// }
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
singleCall(e) {
|
singleCall(e) {
|
||||||
uni.showToast({
|
uni.redirectTo({
|
||||||
icon: 'none',
|
url: '/pages/im/private/call?targetId=' + this.targetId + '&mediaType=' + e.type
|
||||||
title: '功能正在开发中'
|
|
||||||
})
|
})
|
||||||
// CallLib.startSingleCall(this.targetId, e.type, '');
|
|
||||||
// uni.redirectTo({
|
|
||||||
// url: '/pages/im/private/call?targetId=' + this.targetId + '&mediaType=' + e.type
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<view class="cell" v-for="(item, index) in messages" :key="index">
|
<view class="cell" v-for="(item, index) in messages" :key="index">
|
||||||
<view class="time">{{ item.sentTime|timeCustomCN }}</view>
|
<view class="time">{{ item.sentTime|timeCustomCN }}</view>
|
||||||
<view :class="['cell-item', item.messageDirection == 1 ? 'right' : 'left']">
|
<view :class="['cell-item', item.messageDirection == 1 ? 'right' : 'left']">
|
||||||
<u-avatar class="avatar" size="40" shape="square" @click="showUser(targetId, item.messageDirection)"
|
<u-avatar class="avatar" size="40" shape="square" @click="showUser(item.senderUserId, item.messageDirection)"
|
||||||
:src="contact(item.senderUserId).portraitUrl" />
|
:src="contact(item.senderUserId).portraitUrl" />
|
||||||
<view class="msg">
|
<view class="msg">
|
||||||
<show-voice v-if="item.objectName === 'RC:HQVCMsg'" :guest="item.messageDirection == 1"
|
<show-voice v-if="item.objectName === 'RC:HQVCMsg'" :guest="item.messageDirection == 1"
|
||||||
|
|||||||
Reference in New Issue
Block a user