|
@@ -74,9 +74,8 @@ export default class Detail extends Component {
|
74
|
74
|
// 初始化页面数据
|
75
|
75
|
initPageData = () => {
|
76
|
76
|
if (!this.state.detail.groupActivityId) {
|
77
|
|
- const router = Taro.getStorageSync('router')
|
78
|
|
- const id = this.$router.params.id || router.query.id
|
79
|
|
- const recordId = this.$router.params.recordId || router.query.recordId
|
|
77
|
+ const id = this.$router.params.id
|
|
78
|
+ const recordId = this.$router.params.recordId
|
80
|
79
|
|
81
|
80
|
this.setState({ id, recordId }, () => {
|
82
|
81
|
this.loadDetail()
|
|
@@ -195,6 +194,8 @@ export default class Detail extends Component {
|
195
|
194
|
this.updateLeftTime(res.taShareActivity.startTime, res.taShareActivity.endTime)
|
196
|
195
|
}
|
197
|
196
|
|
|
197
|
+ Taro.setNavigationBarTitle({ title: res.taShareActivity.activityName })
|
|
198
|
+
|
198
|
199
|
// WxParse.wxParse('article', 'html', res.desc, this.$scope, 0)
|
199
|
200
|
|
200
|
201
|
// savePoint({
|
|
@@ -297,6 +298,12 @@ export default class Detail extends Component {
|
297
|
298
|
}).catch(err => {
|
298
|
299
|
console.log('err:', err)
|
299
|
300
|
Taro.hideLoading()
|
|
301
|
+
|
|
302
|
+ Taro.showToast({
|
|
303
|
+ title: '失败: ' + err.message,
|
|
304
|
+ icon: 'none'
|
|
305
|
+ })
|
|
306
|
+
|
300
|
307
|
this.setState({ submitting: false })
|
301
|
308
|
})
|
302
|
309
|
})
|
|
@@ -420,15 +427,12 @@ export default class Detail extends Component {
|
420
|
427
|
<Notice></Notice>
|
421
|
428
|
<View className="detail-banner">
|
422
|
429
|
<Image mode="widthFix" src={detail.mainImg} className="detail-banner__img"></Image>
|
423
|
|
- {
|
424
|
|
- groupState === GroupInProcess && actState != ActFinished &&
|
425
|
|
- (
|
426
|
|
- <View className="rest-time">
|
427
|
|
- <Text className="row-label">{actState === ActBeforeStart ? '距活动开始 :' : (actState === ActInProcess ? '活动剩余时间 :' : '活动已结束')} </Text>
|
428
|
|
- <Text className="row-content">{actState != ActFinished ? formateLeftTime(leftTime) : ''}</Text>
|
429
|
|
- </View>
|
430
|
|
- )
|
431
|
|
- }
|
|
430
|
+
|
|
431
|
+ <View className="rest-time">
|
|
432
|
+ <Text className="row-label">{actState === ActBeforeStart ? '距活动开始 :' : (actState === ActInProcess ? '活动剩余时间 :' : '')} </Text>
|
|
433
|
+ <Text className="row-content">{actState != ActFinished ? formateLeftTime(leftTime) : '活动已结束'}</Text>
|
|
434
|
+ </View>
|
|
435
|
+
|
432
|
436
|
</View>
|
433
|
437
|
<ScrollView
|
434
|
438
|
scrollY
|