|
@@ -37,8 +37,6 @@ let urlToJson = (url = window.location.href) => { // 箭头函数默认传值为
|
|
|
|
|
|
export default {
|
|
|
joinUrl() {
|
|
|
- console.log('***************************')
|
|
|
- console.log(this.data.url)
|
|
|
let options = {
|
|
|
API_BASE_URL: api.API_BASE_URL,
|
|
|
"url": this.data.url,
|
|
@@ -65,12 +63,20 @@ export default {
|
|
|
if (this.data.join && !this.options.join) {
|
|
|
sponsor = false
|
|
|
}
|
|
|
-
|
|
|
+ // remote.viewHost
|
|
|
+ // let hostUrl
|
|
|
+ // if(options.url.indexOf('www.4dkankan.com')!=-1){
|
|
|
+ // hostUrl ='https://www.4dkankan.com'
|
|
|
+ // }else{
|
|
|
+ // hostUrl ='https://zfb.4dkankan.com'
|
|
|
+ // }
|
|
|
let base = remote.viewHost + '/shop-container/fashilong.html?env=' + remote.env + '&sponsor=' + sponsor + '&many=' + this.data.many
|
|
|
+ // let base = hostUrl + '/shop-container/fashilong.html?env=' + remote.env + '&sponsor=' + sponsor + '&many=' + this.data.many
|
|
|
// let base = remote.viewHost + '/shop.html'
|
|
|
|
|
|
this.data.reload = false
|
|
|
this.data.showCommodity = false
|
|
|
+ // options.url = options.url+'&vlog';
|
|
|
if (!this.data.webviewUrl) {
|
|
|
this.setData({
|
|
|
'webviewUrl': base + '#' + JSON.stringify(options)
|
|
@@ -239,11 +245,19 @@ export default {
|
|
|
|
|
|
|
|
|
|
|
|
- this.role !== 'leader'
|
|
|
+ // this.role !== 'leader'
|
|
|
let roomType
|
|
|
if ((!this.data.canShow && !this.data.join) || (this.data.join && !this.options.join)) {
|
|
|
roomType = '1v1'
|
|
|
+ if (this.options.roomId) {
|
|
|
+ this.role = 'leader'
|
|
|
+ }
|
|
|
+ console.log('**************')
|
|
|
+ console.log(this.options)
|
|
|
}
|
|
|
+ // wx.showToast({
|
|
|
+ // title: this.data.peopleCount.toString(),
|
|
|
+ // })
|
|
|
return {
|
|
|
role: this.role || 'leader',
|
|
|
userId: userInfo.userId,
|
|
@@ -331,11 +345,14 @@ export default {
|
|
|
console.log('调用', data.type, '方法', data)
|
|
|
if (this[data.type]) {
|
|
|
this[data.type](data)
|
|
|
+ } else if (data.type == 'wx-subscribe') {
|
|
|
+ this.getUrlCode(data.data)
|
|
|
} else {
|
|
|
console.error('没有', data.type, '方法')
|
|
|
}
|
|
|
})
|
|
|
|
|
|
+
|
|
|
socket.on('action', (data) => {
|
|
|
if (data.type === 'navigateToGoods') {
|
|
|
this.navigateToGoodsAction(data.data)
|
|
@@ -375,7 +392,33 @@ export default {
|
|
|
|
|
|
return options
|
|
|
},
|
|
|
+ getUrlCode(url) {
|
|
|
+ this.socketSendMessage('clientSyncAction', {
|
|
|
+ sender: 'wx',
|
|
|
+ type: 'wx-subscribe-result',
|
|
|
+ data: 3020
|
|
|
+ })
|
|
|
+ // wx.request({
|
|
|
+ // url: url, //仅为示例,并非真实的接口地址
|
|
|
+ // method: 'get',
|
|
|
+ // success: (res) => {
|
|
|
+ // let code = -1
|
|
|
+ // if (typeof res.data.code != 'undefined') {
|
|
|
+ // code = res.data.code
|
|
|
+ // }
|
|
|
+
|
|
|
+ // this.socketSendMessage('clientSyncAction', {
|
|
|
+ // sender: 'wx',
|
|
|
+ // type: 'wx-subscribe-result',
|
|
|
+ // data: code
|
|
|
+ // })
|
|
|
|
|
|
+ // },
|
|
|
+ // fail: (err) => {
|
|
|
+ // console.log(err)
|
|
|
+ // }
|
|
|
+ // })
|
|
|
+ },
|
|
|
changeRoomEnableTalk(data) {
|
|
|
console.log(data)
|
|
|
let noMute = getApp().globalData.voiceProps.noMute
|
|
@@ -525,7 +568,8 @@ export default {
|
|
|
this.data.many = !!this.data.canShow
|
|
|
|
|
|
this.setData({
|
|
|
- peopleCount: this.data.many ? manyCount : 5
|
|
|
+ // peopleCount: this.data.many ? manyCount : 5
|
|
|
+ peopleCount: this.data.many ? manyCount : 2
|
|
|
})
|
|
|
|
|
|
let base = this.base
|
|
@@ -1030,7 +1074,8 @@ export default {
|
|
|
this.data.many = !!res.data.brand.canShow
|
|
|
}
|
|
|
this.setData({
|
|
|
- peopleCount: this.data.many ? manyCount : 5,
|
|
|
+ // peopleCount: this.data.many ? manyCount : 5,
|
|
|
+ peopleCount: this.data.many ? manyCount : 2,
|
|
|
})
|
|
|
|
|
|
if (!res.data.brand.canShow) {
|