xujing 5 年前
父节点
当前提交
fe32ec6084
共有 1 个文件被更改,包括 7 次插入2 次删除
  1. 7
    2
      src/onlineSelling/pages/live/index.js

+ 7
- 2
src/onlineSelling/pages/live/index.js 查看文件

45
     posterConfig: [],
45
     posterConfig: [],
46
     consultData: {}, // 分享的置业顾问信息
46
     consultData: {}, // 分享的置业顾问信息
47
     consultShow: false,  // 置业顾问悬浮框显示隐藏
47
     consultShow: false,  // 置业顾问悬浮框显示隐藏
48
+    noRecord: false,
48
   }
49
   }
49
 
50
 
50
 
51
 
118
     }
119
     }
119
 
120
 
120
     queryLiveDetail(id).then(res => {
121
     queryLiveDetail(id).then(res => {
121
-
122
+      Taro.hideToast()
122
       this.setState({
123
       this.setState({
123
         liveDetail: res || {},
124
         liveDetail: res || {},
125
+        noRecord: res.status == '1' ? false : true
124
       })
126
       })
125
       const { templates = [], posterImg = '' } = (res.posters || [])[0]
127
       const { templates = [], posterImg = '' } = (res.posters || [])[0]
126
 
128
 
132
           this.setState({ posterConfig, posterData })
134
           this.setState({ posterConfig, posterData })
133
         })
135
         })
134
       })
136
       })
137
+    }).catch(err => {
138
+      Taro.hideToast()
135
     })
139
     })
136
   }
140
   }
137
 
141
 
306
       posterData,
310
       posterData,
307
       posterConfig,
311
       posterConfig,
308
       liveDetail,
312
       liveDetail,
313
+      noRecord
309
     } = this.state
314
     } = this.state
310
 
315
 
311
     const { userInfo: { person } } = this.props
316
     const { userInfo: { person } } = this.props
321
         }
326
         }
322
         {/* 生成海报 */}
327
         {/* 生成海报 */}
323
         {showPoster && <Poster data={posterData} configs={posterConfig} onCancel={this.togglePosterStatus} onFinish={this.togglePosterStatus} ></Poster>}
328
         {showPoster && <Poster data={posterData} configs={posterConfig} onCancel={this.togglePosterStatus} onFinish={this.togglePosterStatus} ></Poster>}
324
-        {liveDetail.status == 1 ?
329
+        {!noRecord ?
325
           <View className="live-page">
330
           <View className="live-page">
326
             <Image onClick={this.handleLiveBtn} src={transferImage(liveDetail.detailTypeImg || bgImg)} mode='widthFix' className="bg_img"></Image>
331
             <Image onClick={this.handleLiveBtn} src={transferImage(liveDetail.detailTypeImg || bgImg)} mode='widthFix' className="bg_img"></Image>
327
             {this.renderBottom()}
332
             {this.renderBottom()}