|
@@ -344,17 +344,31 @@ export default {
|
|
|
this.role = 'customer'
|
|
|
isAllowMic = 0
|
|
|
}
|
|
|
-
|
|
|
+ // 助手改用isAssistant作为flag, role因为V3不能新增角色,只支持leader/customer。
|
|
|
+ let isAssistant
|
|
|
if (assistant && assistant.userId && assistant.userId == userInfo.userId) {
|
|
|
- this.role = 'assistant'
|
|
|
+ isAssistant = true;
|
|
|
+ } else {
|
|
|
+ isAssistant = false
|
|
|
}
|
|
|
- console.log('进入房间角色,', this.role);
|
|
|
+ console.log('进入房间角色, 是否助手 %s', this.role, isAssistant);
|
|
|
|
|
|
const isAuthMic = await this.getAuthorizeRecordStatus();
|
|
|
|
|
|
console.log('当前用户录音权限状态', isAuthMic)
|
|
|
|
|
|
const assistantId = (assistant && assistant.userId) ? assistant.userId : '';
|
|
|
+
|
|
|
+ if (capacities) {
|
|
|
+ this.setData({
|
|
|
+ peopleCount: capacities
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ this.setData({
|
|
|
+ peopleCount: manyCount
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
return {
|
|
|
role: this.role,
|
|
|
userId: userInfo.userId,
|
|
@@ -368,6 +382,7 @@ export default {
|
|
|
sceneNumber: sceneId,
|
|
|
onlineStatus: 1,
|
|
|
assistantId: assistantId,
|
|
|
+ isAssistant: isAssistant ? 1 : 0,
|
|
|
oid: userInfo.weixin_openid,
|
|
|
userLimitNum: capacities || 50
|
|
|
}
|
|
@@ -766,10 +781,10 @@ export default {
|
|
|
this.socketStop && this.socketStop()
|
|
|
this.data.many = !!this.data.canShow
|
|
|
|
|
|
- this.setData({
|
|
|
- // peopleCount: this.data.many ? manyCount : 5
|
|
|
- peopleCount: manyCount
|
|
|
- })
|
|
|
+ // this.setData({
|
|
|
+ // // peopleCount: this.data.many ? manyCount : 5
|
|
|
+ // peopleCount: manyCount
|
|
|
+ // })
|
|
|
|
|
|
let base = this.base
|
|
|
let socketOptions = await this.socketStart({
|
|
@@ -969,22 +984,24 @@ export default {
|
|
|
|
|
|
|
|
|
share() {
|
|
|
- console.log('**********')
|
|
|
- // console.log(!!this.data.mamy)
|
|
|
+
|
|
|
+ console.log('share-debug')
|
|
|
const companyName = `指房宝(杭州)科技有限公司`
|
|
|
const vrLink = `/pages/webview/index`
|
|
|
const img_url = this.data.newPicUrl || 'http://video.cgaii.com/new4dage/images/images/home_2_a.jpg'
|
|
|
const shareImg = img_url
|
|
|
this.count = this.count || 0
|
|
|
+ console.log('share-debug many:%s shareStatus: %s', !!this.data.many, this.data.shareStatus);
|
|
|
+ // debugger;
|
|
|
if (this.data.many && this.data.shareStatus == 1) {
|
|
|
//开启一起逛时候的分享
|
|
|
- console.log(`/pages/shareRoom/shareRoom?img_url=${btoa(img_url)}&vrLink=${btoa(vrLink)}&id=${this.data.id}&type=${this.data.type}&roomId=${this.data.socketOptions.roomId}&many=${!!this.data.many}`)
|
|
|
- console.log(this.data.socketOptions)
|
|
|
+ console.log(`share-debug: /pages/shareRoom/shareRoom?img_url=${btoa(img_url)}&vrLink=${btoa(vrLink)}&id=${this.data.id}&type=${this.data.type}&roomId=${this.data.socketOptions.roomId}&many=${!!this.data.many}`)
|
|
|
+ console.log('share-debug', this.data.socketOptions)
|
|
|
wx.navigateTo({
|
|
|
url: `/pages/shareRoom/shareRoom?img_url=${btoa(img_url)}&vrLink=${btoa(vrLink)}&id=${this.data.id}&type=${this.data.type}&roomId=${this.data.socketOptions.roomId}&many=${!!this.data.many}`,
|
|
|
})
|
|
|
} else {
|
|
|
- console.log(`/pages/shared/shared?img_url=${btoa(img_url)}&shareImg=${btoa(shareImg)}&companyName=${companyName}&vrLink=${btoa(vrLink)}&id=${this.data.id}&type=${this.data.type}`);
|
|
|
+ console.log(`share-debug: /pages/shared/shared?img_url=${btoa(img_url)}&shareImg=${btoa(shareImg)}&companyName=${companyName}&vrLink=${btoa(vrLink)}&id=${this.data.id}&type=${this.data.type}`);
|
|
|
wx.navigateTo({
|
|
|
url: `/pages/shared/shared?img_url=${btoa(img_url)}&shareImg=${btoa(shareImg)}&companyName=${companyName}&vrLink=${btoa(vrLink)}&id=${this.data.id}&type=${this.data.type}`,
|
|
|
})
|
|
@@ -1303,7 +1320,7 @@ export default {
|
|
|
contractPhone: res.data.brand.contractPhone
|
|
|
|
|
|
})
|
|
|
-
|
|
|
+ // debugger
|
|
|
if (this.data.many === void 0) {
|
|
|
this.data.many = !!res.data.brand.canShow
|
|
|
}
|