<view class="anniu3" style="margin-top:10px" @tap.native.stop="telshipin(user2[0].userid,user2[0].nicheng,user2[0].photo,item.userid,item.username,web+item.photo[0])">拨打视频</view>
telshipin(dauserid, dani, daphoto, jieuserid, jieni, jiephoto) {
console.log("dauserid:", dauserid);
console.log("dani:", dani);
console.log("daphoto:", daphoto);
console.log("jieuserid:", jieuserid);
console.log("jieni:", jieni);
console.log("jiephoto:", jiephoto);
wx.setEnable1v1Chat({
enable: true,
success(res) {
console.log('setEnable1v1Chatres:',res)
wx.join1v1Chat({
listener: { //接入
nickname: jieni,
headImage: jiephoto,
openId: jieuserid, //获取小程序用户的openId
},
caller: { //呼出
nickname: dani,
headImage: daphoto,
openId: dauserid, //获取小程序用户的openId
},
success(res) {
console.log('[startCallWx]res', res)
},
fail(err) {
console.log('[startCallWx]err', err)
}
})
},
fail(err) {
console.error("拨通失败", err)
}
})
}
上面测试拨打是2023-10-6 13:41分 拨打的。
发起方OPENID:ov4JM5Qo6j8kovOjS4FjlNUwvoc4
接收方OPENID:ov4JM5bTWPDHx07wlIVLYFtxLDaA
日志过期了,重新复现一下,提供open id和时间点
配置项写错了 openId改成openid就可以了