|
|
@@ -147,11 +147,12 @@
|
|
|
this.$store.commit('updateMessageList', val.data)
|
|
|
|
|
|
} else if (val.action == 'recv_video') {
|
|
|
- console.warn('recv_video---------------- 1', val.data)
|
|
|
- if (this.$store.state.isVideoCallRefused) {
|
|
|
- this.$store.commit('updateIsRefusedCall', false)
|
|
|
- return
|
|
|
- }
|
|
|
+ console.warn('recv_video---------------- 1', val.data, this.$store.state
|
|
|
+ .isVideoCallRefused)
|
|
|
+ // if (this.$store.state.isVideoCallRefused) {
|
|
|
+ // this.$store.commit('updateIsRefusedCall', false)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
|
|
|
// this.$store.state.video = val.data
|
|
|
this.$store.commit('updateIsRefusedCall', false)
|
|
|
@@ -166,7 +167,7 @@
|
|
|
data: JSON.stringify(obj),
|
|
|
async success(res) {
|
|
|
|
|
|
- console.warn('占线消息发送成功1111', val.data)
|
|
|
+ console.warn('占线消息发送成功1111', obj)
|
|
|
}
|
|
|
});
|
|
|
return
|
|
|
@@ -193,10 +194,10 @@
|
|
|
}, 1500)
|
|
|
} else if (val.action == 'send_video_rsp') {
|
|
|
console.warn('recv_video---------------- response', val.data)
|
|
|
- if (this.$store.state.isVideoCallRefused) {
|
|
|
- this.$store.commit('updateIsRefusedCall', false)
|
|
|
- return
|
|
|
- }
|
|
|
+ // if (this.$store.state.isVideoCallRefused) {
|
|
|
+ // this.$store.commit('updateIsRefusedCall', false)
|
|
|
+ // return
|
|
|
+ // }
|
|
|
|
|
|
this.$store.commit('updateIsRefusedCall', false)
|
|
|
// if(this.)
|
|
|
@@ -219,7 +220,7 @@
|
|
|
}
|
|
|
})
|
|
|
} else if (val.action == 'reject_video_rsp') {
|
|
|
- console.warn('reject_video_rsp','挂断 拒接')
|
|
|
+ console.warn('reject_video_rsp', '挂断 拒接')
|
|
|
// 被拒绝后挂断视频通话
|
|
|
this.$store.commit('updateIsRefusedCall', true)
|
|
|
} else if (val.action == 'occupy_rsp') {
|
|
|
@@ -229,13 +230,14 @@
|
|
|
} else if (val.action == 'ok') {
|
|
|
this.start(); // 心跳机制
|
|
|
} else if (val.action == 'error') {
|
|
|
- if (val.data.code == 403) {
|
|
|
+ console.log('action error')
|
|
|
+ if (val.code == 403 || val.data && val.data.code == 403) {
|
|
|
|
|
|
this.close();
|
|
|
uni.setStorageSync('session_key', '')
|
|
|
if (!this.$store.state.isInLoginPage) {
|
|
|
|
|
|
- uni.$u.totast(val.data.data && val.data.data.error_info ||'用户在其他地方登陆,请重新登陆')
|
|
|
+ uni.$u.totast(val.data.data && val.data.data.error_info || '用户在其他地方登陆,请重新登陆')
|
|
|
setTimeout(() => {
|
|
|
uni.navigateTo({
|
|
|
url: "/pages/login/login"
|