diff --git a/pages/im/private/call.nvue b/pages/im/private/call.nvue index f4be96d..e92287c 100644 --- a/pages/im/private/call.nvue +++ b/pages/im/private/call.nvue @@ -10,8 +10,7 @@ - + {{ contact(targetId).name }} 等待对方接听 已接通 @@ -68,10 +67,10 @@ }, onLoad(e) { this.targetId = e.targetId - this.mediaType = e.mediaType - // 进入页面开启外呼 - CallLib.startSingleCall(this.targetId, this.mediaType, ''); - + this.mediaType = e.mediaType + // 进入页面开启外呼 + CallLib.startSingleCall(this.targetId, this.mediaType, ''); + // 响铃 this.startRing() // 监听通话链接状态 uni.$once('onCallConnected', this.onCallConnected) @@ -92,11 +91,11 @@ }, windowHeight() { return uni.getSystemInfoSync().windowHeight - }, - contact() { - return function(targetId) { - return this.$store.getters.contactInfo(targetId) - } + }, + contact() { + return function(targetId) { + return this.$store.getters.contactInfo(targetId) + } } }, methods: { @@ -120,10 +119,8 @@ if (this.mediaType == 1) { const session = CallLib.getCurrentCallSession() setTimeout(() => { - CallLib.setVideoView(session.targetId, this.$refs.bigVideoView.ref, 0, - false) - CallLib.setVideoView(session.mine.userId, this.$refs.smallVideoView.ref, 0, - true) + CallLib.setVideoView(session.targetId, this.$refs.bigVideoView.ref, 0, false) + CallLib.setVideoView(session.mine.userId, this.$refs.smallVideoView.ref, 0, true) }, 200) } }, diff --git a/utils/im/index.js b/utils/im/index.js index d969209..320af90 100644 --- a/utils/im/index.js +++ b/utils/im/index.js @@ -18,7 +18,9 @@ const initIm = (KEY) => { // 初始化的时候 自动链接 if (store.getters.getToken !== '') { getImToken().then(res => { - connect(res.token, res.userInfo, () => {}) + connect(res.token, res.userInfo, (res) => { + console.log('IM.CONNECT', res); + }) }) } }