|
@@ -89,8 +89,8 @@
|
|
orderId: options.orderId
|
|
orderId: options.orderId
|
|
}, 'GET').then(res => {
|
|
}, 'GET').then(res => {
|
|
this.setData({
|
|
this.setData({
|
|
- head_img:res.data.liveProducResVO[0].imgPath,
|
|
|
|
- title:res.data.liveProducResVO[0].productName
|
|
|
|
|
|
+ head_img:res.data.headImg,
|
|
|
|
+ title:res.data.tenantName
|
|
})
|
|
})
|
|
this.liveId = res.data.liveId
|
|
this.liveId = res.data.liveId
|
|
this.roomId = res.data.roomId
|
|
this.roomId = res.data.roomId
|
|
@@ -167,22 +167,43 @@
|
|
},
|
|
},
|
|
bindTRTCRoomEvent: function() {
|
|
bindTRTCRoomEvent: function() {
|
|
const TRTC_EVENT = this.trtcComponent.EVENT;
|
|
const TRTC_EVENT = this.trtcComponent.EVENT;
|
|
|
|
+ var that=this;
|
|
this.timestamp = []; // 初始化事件订阅
|
|
this.timestamp = []; // 初始化事件订阅
|
|
this.trtcComponent.on(TRTC_EVENT.LOCAL_JOIN, event => {
|
|
this.trtcComponent.on(TRTC_EVENT.LOCAL_JOIN, event => {
|
|
- if(this.trtcComponent.getRemoteUserList().length>0){
|
|
|
|
- var userId=this.trtcComponent.getRemoteUserList()[0].userID;
|
|
|
|
- /* NET.request(API.getMerchantsMainInfo + userId, {}, 'GET').then(res => {
|
|
|
|
- this.setData({
|
|
|
|
- head_img:res.data.merchantImg,
|
|
|
|
- title:res.data.merchantNickname
|
|
|
|
- })
|
|
|
|
- }).catch(error => {
|
|
|
|
- this.$refs.uTips.show({
|
|
|
|
- title: '获取个人信息失败',
|
|
|
|
- type: 'warning',
|
|
|
|
- })
|
|
|
|
- }) */
|
|
|
|
- }
|
|
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ if(that.trtcComponent.getRemoteUserList().length>0){
|
|
|
|
+ var userId=that.trtcComponent.getRemoteUserList()[0].userID;
|
|
|
|
+ /* NET.request(API.getMerchantsMainInfo + userId, {}, 'GET').then(res => {
|
|
|
|
+ this.setData({
|
|
|
|
+ head_img:res.data.merchantImg,
|
|
|
|
+ title:res.data.merchantNickname
|
|
|
|
+ })
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ this.$refs.uTips.show({
|
|
|
|
+ title: '获取个人信息失败',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ }) */
|
|
|
|
+ }else{
|
|
|
|
+ uni.showModal({
|
|
|
|
+ title: '提示',
|
|
|
|
+ content: '商户暂时不在,请联系后进行自助采摘',
|
|
|
|
+ success: function (res) {
|
|
|
|
+ if (res.confirm) {
|
|
|
|
+ wx.navigateBack({
|
|
|
|
+ delta: 1
|
|
|
|
+ });
|
|
|
|
+ } else if (res.cancel) {
|
|
|
|
+ wx.navigateBack({
|
|
|
|
+ delta: 1
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ } ,
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },1000)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
console.log('* room LOCAL_JOIN', event); // 进房成功,触发该事件后可以对本地视频和音频进行设置
|
|
console.log('* room LOCAL_JOIN', event); // 进房成功,触发该事件后可以对本地视频和音频进行设置
|
|
|
|
|