1007395918@qq.com 5 年前
父节点
当前提交
b0e084e169
共有 1 个文件被更改,包括 20 次插入14 次删除
  1. 20
    14
      src/onlineSelling/pages/live/index.js

+ 20
- 14
src/onlineSelling/pages/live/index.js 查看文件

134
   }
134
   }
135
 
135
 
136
   handleLiveBtn = e => {
136
   handleLiveBtn = e => {
137
-    const id = this.$router.params.id || this.state.liveDetail.liveActivityId
138
-    addLiveNum(id).then(res => { })
139
-    const { liveDetail: { liveAppAppId, liveRoomParam } } = this.state
140
-
141
-    Taro.navigateToMiniProgram({
142
-      appId: liveAppAppId,
143
-      path: liveRoomParam,
144
-      extraData: {
145
-        foo: 'bar'
146
-      },
147
-      success(res) {
148
-        console.log(res, "navigateToMiniProgram")
149
-      }
150
-    })
137
+    const { liveDetail: { liveAppAppId, liveAppPath } } = this.state
138
+    if (liveAppAppId && liveAppPath) {
139
+      const id = this.$router.params.id || this.state.liveDetail.liveActivityId
140
+      addLiveNum(id).then(res => { })
141
+   
142
+      Taro.navigateToMiniProgram({
143
+        appId: liveAppAppId,
144
+        path: liveAppPath,
145
+        extraData: {
146
+          foo: 'bar'
147
+        },
148
+        success(res) {
149
+          console.log(res, "navigateToMiniProgram")
150
+        }
151
+      })
152
+
153
+    } else {
154
+      Taro.showToast({ title: '后台未配置跳转链接', icon: 'none', duration: 2000 })
155
+    }
151
 
156
 
152
   }
157
   }
153
   currentPageAndParams() {
158
   currentPageAndParams() {
295
 
300
 
296
     const { userInfo: { person } } = this.props
301
     const { userInfo: { person } } = this.props
297
     const showCircleBtn = posterData && posterData.qrcode
302
     const showCircleBtn = posterData && posterData.qrcode
303
+    console.log('==============>', posterData, showPoster, posterConfig)
298
     return (
304
     return (
299
       <Block>
305
       <Block>
300
         {/* 授权电话与头像 */}
306
         {/* 授权电话与头像 */}