|
@@ -4,15 +4,17 @@ import Notice from '@components/Notice'
|
4
|
4
|
import BackHomeBtn from '@components/BackHomeBtn'
|
5
|
5
|
import Poster from './poster'
|
6
|
6
|
import dayjs from 'dayjs'
|
7
|
|
-import WxParse from '@components/wxParse/wxParse'
|
|
7
|
+// import WxParse from '@components/wxParse/wxParse'
|
8
|
8
|
import getUserPhone from '@utils/getUserPhone'
|
9
|
9
|
import ready from '@utils/ready'
|
|
10
|
+import { getDownloadURL } from '@utils/tools'
|
10
|
11
|
import {
|
11
|
|
- addActivityShareNum,
|
|
12
|
+ // addActivityShareNum,
|
12
|
13
|
signupActivity,
|
13
|
14
|
favorActivity,
|
14
|
15
|
cancelFavorActivity,
|
15
|
|
- queryActivityDetail
|
|
16
|
+ queryActivityDetail,
|
|
17
|
+ getHelpDetail,
|
16
|
18
|
} from '@services/activity'
|
17
|
19
|
import {
|
18
|
20
|
getMiniQrcode,
|
|
@@ -21,6 +23,14 @@ import {
|
21
|
23
|
} from '@services/common'
|
22
|
24
|
import { connect } from '@tarojs/redux'
|
23
|
25
|
|
|
26
|
+const times = n => n > 0 ? '*'.repeat(n-1).split('*') : []
|
|
27
|
+
|
|
28
|
+const BeforeStart = 0;
|
|
29
|
+const InProcess = 1;
|
|
30
|
+const Finished = 2;
|
|
31
|
+
|
|
32
|
+const defaultAvatar = require('@assets/agent/banner.png')
|
|
33
|
+
|
24
|
34
|
@connect(state => state.user)
|
25
|
35
|
export default class Detail extends Component {
|
26
|
36
|
config = {
|
|
@@ -28,138 +38,183 @@ export default class Detail extends Component {
|
28
|
38
|
}
|
29
|
39
|
|
30
|
40
|
state = {
|
31
|
|
- id: null,
|
|
41
|
+ id: null, // 活动ID
|
|
42
|
+ initiateId: undefined, // 发起活动
|
32
|
43
|
loaded: false,
|
33
|
|
- detail: {},
|
34
|
|
- recordId: null,
|
35
|
|
- isSaved: false,
|
36
|
|
- isSign: false,
|
37
|
|
- posterShow: false,
|
38
|
|
- posterData: {},
|
39
|
|
- posterVisible: false,
|
40
|
|
- selector: ['1', '2', '3'],
|
41
|
|
- selectorChecked: '1',
|
42
|
|
- canChoose: 'none',
|
43
|
|
- inputName: ''
|
|
44
|
+ detail: {}, // 活动详情
|
|
45
|
+ initiateDetail: {}, // 发起详情
|
|
46
|
+ helpList: [], // 助力人员列表
|
|
47
|
+ shares: [], // 分享设置
|
|
48
|
+ posters: [], // 海报设置
|
|
49
|
+ leftTime: 0, // 剩余时间
|
|
50
|
+ ltTicker: undefined, // 剩余时间计时器
|
|
51
|
+ actState: BeforeStart, // 活动状态
|
|
52
|
+ isStarter: false, // 是否发起人
|
44
|
53
|
}
|
45
|
54
|
|
46
|
55
|
componentWillMount() {
|
47
|
56
|
ready.queue(() => {
|
48
|
57
|
const router = Taro.getStorageSync('router')
|
49
|
|
- const id = this.$router.params.id || router.query.id || '2fe920719b8b0db50011441462e647ad'
|
50
|
|
- this.setState({ id }, () => {
|
|
58
|
+ const id = this.$router.params.id || router.query.id
|
|
59
|
+ const initiateId = this.$router.params.initiateId || router.query.initiateId
|
|
60
|
+
|
|
61
|
+ this.setState({ id, initiateId }, () => {
|
51
|
62
|
this.loadDetail()
|
52
|
63
|
})
|
|
64
|
+
|
|
65
|
+ const { userInfo: { person: { phone, avatarurl } } } = this.props
|
|
66
|
+ if (!phone) {
|
|
67
|
+ // todo 授权电话
|
|
68
|
+ }
|
|
69
|
+
|
|
70
|
+ if (!avatarurl) {
|
|
71
|
+ // todo 授权头像
|
|
72
|
+ }
|
53
|
73
|
})
|
54
|
74
|
}
|
|
75
|
+
|
55
|
76
|
componentWillUnmount() {
|
56
|
77
|
const { recordId } = this.state
|
57
|
78
|
recordId && updatePoint(recordId)
|
|
79
|
+
|
|
80
|
+ this.clearTicker()
|
|
81
|
+ }
|
|
82
|
+
|
|
83
|
+ clearTicker() {
|
|
84
|
+ if (this.state.ltTicker) {
|
|
85
|
+ clearInterval(this.state.ltTicker)
|
|
86
|
+ this.setState({ ltTicker: undefined })
|
|
87
|
+ }
|
|
88
|
+ }
|
|
89
|
+
|
|
90
|
+ updateLeftTime(startDate, endDate) {
|
|
91
|
+ const st = dayjs(startDate).valueOf()
|
|
92
|
+ const ed = dayjs(endDate).valueOf()
|
|
93
|
+
|
|
94
|
+ this.setState({
|
|
95
|
+ ltTicker: setInterval(() => {
|
|
96
|
+ const nw = dayjs().valueOf()
|
|
97
|
+
|
|
98
|
+ if (st > nw) {
|
|
99
|
+ // 活动未开始
|
|
100
|
+ this.setState({
|
|
101
|
+ leftTime: st - nw,
|
|
102
|
+ actState: BeforeStart,
|
|
103
|
+ })
|
|
104
|
+ } else if (ed > nw) {
|
|
105
|
+ // 活动未结束
|
|
106
|
+ this.setState({
|
|
107
|
+ leftTime: ed - nw,
|
|
108
|
+ actState: InProcess,
|
|
109
|
+ })
|
|
110
|
+ } else {
|
|
111
|
+ // 活动已结束
|
|
112
|
+ this.clearTicker()
|
|
113
|
+ this.setState({
|
|
114
|
+ leftTime: 0,
|
|
115
|
+ actState: Finished,
|
|
116
|
+ })
|
|
117
|
+ }
|
|
118
|
+ }, 1000)
|
|
119
|
+ })
|
|
120
|
+ }
|
|
121
|
+
|
|
122
|
+ formateLeftTime() {
|
|
123
|
+ const nd = 1000 * 24 * 60 * 60;
|
|
124
|
+ const nh = 1000 * 60 * 60;
|
|
125
|
+ const nm = 1000 * 60;
|
|
126
|
+ const ns = 1000;
|
|
127
|
+
|
|
128
|
+ const day = Math.floor(this.state.leftTime / nd);
|
|
129
|
+ const hour = Math.floor(this.state.leftTime % nd / nh);
|
|
130
|
+ const min = Math.floor(this.state.leftTime % nd % nh / nm);
|
|
131
|
+ const sec = Math.floor(this.state.leftTime % nd % nh % nm / ns);
|
|
132
|
+
|
|
133
|
+ return `${day}天${hour}小时${min}分${sec}秒`
|
58
|
134
|
}
|
59
|
135
|
|
60
|
136
|
loadDetail() {
|
61
|
137
|
const { id } = this.state
|
62
|
138
|
Taro.showLoading()
|
63
|
|
- queryActivityDetail(id).then(res => {
|
|
139
|
+ getHelpDetail(id).then(res => {
|
|
140
|
+ this.clearTicker()
|
|
141
|
+
|
64
|
142
|
Taro.hideLoading()
|
65
|
143
|
const { isSaved, isSign } = res
|
|
144
|
+
|
|
145
|
+ // 活动状态分两种
|
|
146
|
+ // 一种是活动本身是否在进行中
|
|
147
|
+ // 一种是, 某个人发起的助力,是否在进行中
|
|
148
|
+ // 发起的助力活动状态, 1 代表进行中, 0 代表成功, 2 代表失败
|
|
149
|
+
|
66
|
150
|
this.setState({
|
67
|
|
- detail: res,
|
68
|
|
- isSaved,
|
69
|
|
- isSign,
|
70
|
|
- loaded: true
|
|
151
|
+ detail: res.helpActivity,
|
|
152
|
+ initiateDetail: res.helpInitiateRecord || {},
|
|
153
|
+ shares: res.shareContentList || [],
|
|
154
|
+ posters: res.postList || [],
|
|
155
|
+ helpList: res.helpRecordList || [],
|
|
156
|
+ loaded: true,
|
71
|
157
|
}, () => {
|
72
|
|
- const { detail } = this.state
|
73
|
|
- if (detail.posters[0].posterImg) {
|
74
|
|
- this.setState({
|
75
|
|
- posterShow: true
|
76
|
|
- })
|
77
|
|
- }
|
|
158
|
+ // const { detail } = this.state
|
|
159
|
+ // if (detail.posters[0].posterImg) {
|
|
160
|
+ // this.setState({
|
|
161
|
+ // posterShow: true
|
|
162
|
+ // })
|
|
163
|
+ // }
|
|
164
|
+ this.updateLeftTime(res.helpActivity.startDate, res.helpActivity.endDate)
|
78
|
165
|
})
|
79
|
|
- WxParse.wxParse('article', 'html', res.desc, this.$scope, 0)
|
|
166
|
+ // WxParse.wxParse('article', 'html', res.desc, this.$scope, 0)
|
80
|
167
|
|
81
|
168
|
savePoint({
|
82
|
169
|
event: 'detail',
|
83
|
|
- eventType: 'activity',
|
84
|
|
- propertyName: '活动详情',
|
|
170
|
+ eventType: 'help',
|
|
171
|
+ propertyName: '助力详情',
|
85
|
172
|
buildingId: res.buildingId,
|
86
|
|
- targetId: res.dynamicId,
|
|
173
|
+ targetId: res.helpActivityId,
|
87
|
174
|
data: '{}'
|
88
|
175
|
}).then(res1 => {
|
89
|
176
|
this.setState({
|
90
|
177
|
recordId: res1.recordId
|
91
|
178
|
})
|
92
|
|
- console.log('活动详情')
|
93
|
179
|
})
|
94
|
180
|
})
|
95
|
181
|
}
|
|
182
|
+
|
96
|
183
|
onShareAppMessage = () => {
|
97
|
|
- const { detail: { shareContents, title, dynamicId, url } } = this.state
|
|
184
|
+ const { detail } = this.state
|
98
|
185
|
const { userInfo: { person: { personId } } } = this.props
|
99
|
186
|
|
100
|
|
- addActivityShareNum(dynamicId)
|
|
187
|
+ // addActivityShareNum(detail.helpActivityId)
|
101
|
188
|
|
102
|
189
|
savePoint({
|
103
|
190
|
event: 'share',
|
104
|
|
- eventType: 'activity',
|
105
|
|
- propertyName: '活动详情分享',
|
|
191
|
+ eventType: 'help',
|
|
192
|
+ propertyName: '助力详情分享',
|
106
|
193
|
data: '{}'
|
107
|
194
|
}).then(res => {
|
108
|
|
- console.log('活动详情分享')
|
|
195
|
+
|
109
|
196
|
})
|
110
|
197
|
return {
|
111
|
198
|
title: shareContents[0].shareContentTitle,
|
112
|
|
- path: `/pages/activity/detail/index?id=${dynamicId}&from=dynamic_share&recommender=${personId}`,//分享地址
|
113
|
|
- imageUrl: shareContents[0].shareContentImg
|
|
199
|
+ path: `pages/activity/detail/assistance?id=${detail.helpActivityId}&from=help_share&recommender=${personId}`,//分享地址
|
|
200
|
+ // imageUrl: shareContents[0].shareContentImg
|
114
|
201
|
}
|
115
|
202
|
}
|
116
|
203
|
|
117
|
|
- handleSignup() {
|
118
|
|
- const { detail: { buildingId, dynamicId }, isSign } = this.state
|
119
|
|
- const { userInfo: { person: { phone, name, nickname } } } = this.props
|
|
204
|
+ handleHelp() {
|
|
205
|
+ if (this.state.loaded) return
|
120
|
206
|
|
121
|
|
- if (isSign) {
|
122
|
|
- Taro.showToast({
|
123
|
|
- icon: 'none',
|
124
|
|
- title: '你已报名成功'
|
125
|
|
- })
|
126
|
|
- return
|
127
|
|
- }
|
|
207
|
+ Taro.showLoading()
|
|
208
|
+ this.setState({ loaded: true }, () => {
|
|
209
|
+ Taro.hideLoading()
|
|
210
|
+ this.setState({ loaded: false })
|
128
|
211
|
|
129
|
|
- this.setState({
|
130
|
|
- canChoose: 'block'
|
|
212
|
+ // 助力好友
|
|
213
|
+ // todo
|
131
|
214
|
})
|
132
|
215
|
}
|
133
|
216
|
|
134
|
217
|
handleFavor() {
|
135
|
|
- const { detail: { dynamicId }, isSaved } = this.state
|
136
|
|
- if (isSaved) {
|
137
|
|
- cancelFavorActivity(dynamicId).then(res => {
|
138
|
|
- Taro.showToast({
|
139
|
|
- title: '已取消收藏'
|
140
|
|
- })
|
141
|
|
- this.setState({
|
142
|
|
- isSaved: false
|
143
|
|
- })
|
144
|
|
- })
|
145
|
|
- } else {
|
146
|
|
- favorActivity(dynamicId).then(res => {
|
147
|
|
- Taro.showToast({
|
148
|
|
- title: '收藏成功'
|
149
|
|
- })
|
150
|
|
- this.setState({
|
151
|
|
- isSaved: true
|
152
|
|
- })
|
153
|
|
- })
|
154
|
|
- }
|
155
|
|
- savePoint({
|
156
|
|
- event: 'save',
|
157
|
|
- eventType: 'activity',
|
158
|
|
- propertyName: '活动详情收藏',
|
159
|
|
- data: '{}'
|
160
|
|
- }).then(res => {
|
161
|
|
- console.log('活动详情收藏')
|
162
|
|
- })
|
163
|
218
|
}
|
164
|
219
|
|
165
|
220
|
handleGetPhone(e) {
|
|
@@ -174,6 +229,7 @@ export default class Detail extends Component {
|
174
|
229
|
}
|
175
|
230
|
})
|
176
|
231
|
}
|
|
232
|
+
|
177
|
233
|
getPosterData = () => {
|
178
|
234
|
return new Promise(resolve => {
|
179
|
235
|
const { posterData } = this.state
|
|
@@ -190,7 +246,7 @@ export default class Detail extends Component {
|
190
|
246
|
"page": 'pages/activity/detail/index',
|
191
|
247
|
}
|
192
|
248
|
debugger
|
193
|
|
- const _avatarurl = avatarurl.replace('https://wx.qlogo.cn/', 'https://d.pawoma.cn/qlogo/');
|
|
249
|
+ const _avatarurl = getDownloadURL(avatarurl, 'avatar');
|
194
|
250
|
getMiniQrcode(payload).then(qrcode => {
|
195
|
251
|
let data = {
|
196
|
252
|
qrcode,//小程序二维码
|
|
@@ -204,6 +260,7 @@ export default class Detail extends Component {
|
204
|
260
|
})
|
205
|
261
|
})
|
206
|
262
|
}
|
|
263
|
+
|
207
|
264
|
// 开始生成海报
|
208
|
265
|
togglePosterStatus = (flag) => {
|
209
|
266
|
if (flag) {
|
|
@@ -213,7 +270,7 @@ export default class Detail extends Component {
|
213
|
270
|
posterData
|
214
|
271
|
})
|
215
|
272
|
})
|
216
|
|
- // App.zhuge.track('生成活动详情海报')
|
|
273
|
+ // App.zhuge.track('生成助力详情海报')
|
217
|
274
|
} else {
|
218
|
275
|
this.setState({
|
219
|
276
|
posterVisible: !!flag
|
|
@@ -221,11 +278,11 @@ export default class Detail extends Component {
|
221
|
278
|
}
|
222
|
279
|
savePoint({
|
223
|
280
|
event: 'poster',
|
224
|
|
- eventType: 'activity',
|
225
|
|
- propertyName: '生成活动详情海报',
|
|
281
|
+ eventType: 'help',
|
|
282
|
+ propertyName: '生成助力详情海报',
|
226
|
283
|
data: '{}'
|
227
|
284
|
}).then(res => {
|
228
|
|
- console.log('生成活动详情海报')
|
|
285
|
+ console.log('生成助力详情海报')
|
229
|
286
|
})
|
230
|
287
|
}
|
231
|
288
|
|
|
@@ -250,7 +307,6 @@ export default class Detail extends Component {
|
250
|
307
|
}
|
251
|
308
|
|
252
|
309
|
comfire = e => {
|
253
|
|
-
|
254
|
310
|
const { detail: { buildingId, dynamicId }, isSign, selectorChecked, inputName } = this.state
|
255
|
311
|
const { userInfo: { person: { phone, name, nickname, tel } } } = this.props
|
256
|
312
|
|
|
@@ -282,11 +338,11 @@ export default class Detail extends Component {
|
282
|
338
|
|
283
|
339
|
savePoint({
|
284
|
340
|
event: 'enlist',
|
285
|
|
- eventType: 'activity',
|
286
|
|
- propertyName: '活动详情报名',
|
|
341
|
+ eventType: 'help',
|
|
342
|
+ propertyName: '助力详情报名',
|
287
|
343
|
data: '{}'
|
288
|
344
|
}).then(res => {
|
289
|
|
- console.log('活动详情报名 ')
|
|
345
|
+ console.log('助力详情报名 ')
|
290
|
346
|
})
|
291
|
347
|
}
|
292
|
348
|
|
|
@@ -297,8 +353,12 @@ export default class Detail extends Component {
|
297
|
353
|
}
|
298
|
354
|
|
299
|
355
|
render() {
|
300
|
|
- const { detail, loaded, isSaved, isSign, posterVisible, posterData, posterShow } = this.state
|
301
|
|
- const { userInfo: { person: { phone } } } = this.props
|
|
356
|
+ const { detail, loaded, actState, posterVisible, posterData, isStarter, helpList } = this.state
|
|
357
|
+ const { userInfo: { person: { phone, avatarurl } } } = this.props
|
|
358
|
+
|
|
359
|
+ const avatar = this.state.initiateId ? this.state.initiateDetail.avatarurl : avatarurl
|
|
360
|
+ const initiateInProcess = initiateDetail.status === 1;
|
|
361
|
+
|
302
|
362
|
return (
|
303
|
363
|
<Block>
|
304
|
364
|
{/* 生成海报 */}
|
|
@@ -309,10 +369,10 @@ export default class Detail extends Component {
|
309
|
369
|
<View>
|
310
|
370
|
<Notice></Notice>
|
311
|
371
|
<View className="detail-banner">
|
312
|
|
- <Image mode="widthFix" src={detail.imgUrl} className="detail-banner__img"></Image>
|
|
372
|
+ <Image mode="widthFix" src={detail.img} className="detail-banner__img"></Image>
|
313
|
373
|
<View className="rest-time">
|
314
|
|
- <Text className="row-label">活动剩余时间:</Text>
|
315
|
|
- <Text className="row-content">{dayjs(detail.enlistEnd).format('YYYY-MM-DD hh:mm:ss')}</Text>
|
|
374
|
+ <Text className="row-label">{actState === BeforeStart ? '距活动开始:' : (actState === InProcess ? '活动剩余时间:' : '活动已结束')} </Text>
|
|
375
|
+ <Text className="row-content">{actState != Finished ? this.formateLeftTime() : ''}</Text>
|
316
|
376
|
</View>
|
317
|
377
|
</View>
|
318
|
378
|
<ScrollView
|
|
@@ -320,116 +380,61 @@ export default class Detail extends Component {
|
320
|
380
|
className="detail-wrap">
|
321
|
381
|
<View className="detail">
|
322
|
382
|
<View class="detail-title">{detail.title}</View>
|
323
|
|
- <Image src={require('@assets/agent/banner.png')} className="my__img"></Image>
|
324
|
|
- <View className="assistance-text">邀请N位好友即可赢取大奖</View>
|
325
|
|
- <View className="assistance-text">0/N</View>
|
|
383
|
+ <Image src={avatar} className="my__img"></Image>
|
|
384
|
+ <View className="assistance-text">邀请{detail.personNum}位好友即可赢取大奖</View>
|
|
385
|
+ <View className="assistance-text">{`${detail.enlistNum || 0}/${detail.personNum}`}</View>
|
326
|
386
|
<View className='tools-main'>
|
327
|
|
- <View className='tools-item'>
|
328
|
|
- <Image src={require('@assets/agent/banner.png')} className='tools-item-img'></Image>
|
329
|
|
- <Text className='tools-item-txt'>等待助力</Text>
|
330
|
|
- </View>
|
331
|
|
- <View className='tools-item'>
|
332
|
|
- <Image src={require('@assets/agent/banner.png')} className='tools-item-img'></Image>
|
333
|
|
- <Text className='tools-item-txt'>等待助力</Text>
|
334
|
|
- </View>
|
335
|
|
- <View className='tools-item'>
|
336
|
|
- <Image src={require('@assets/agent/banner.png')} className='tools-item-img'></Image>
|
337
|
|
- <Text className='tools-item-txt'>等待助力</Text>
|
338
|
|
- </View>
|
339
|
|
- <View className='tools-item'>
|
340
|
|
- <Image src={require('@assets/agent/banner.png')} className='tools-item-img'></Image>
|
341
|
|
- <Text className='tools-item-txt'>等待助力</Text>
|
342
|
|
- </View>
|
343
|
|
- <View className='tools-item'>
|
344
|
|
- <Image src={require('@assets/agent/banner.png')} className='tools-item-img'></Image>
|
345
|
|
- <Text className='tools-item-txt'>等待助力</Text>
|
346
|
|
- </View>
|
347
|
|
- <View className='tools-item'>
|
348
|
|
- <Image src={require('@assets/agent/banner.png')} className='tools-item-img'></Image>
|
349
|
|
- <Text className='tools-item-txt'>等待助力</Text>
|
350
|
|
- </View>
|
351
|
|
- <View className='tools-item'>
|
352
|
|
- <Image src={require('@assets/agent/banner.png')} className='tools-item-img'></Image>
|
353
|
|
- <Text className='tools-item-txt'>等待助力</Text>
|
354
|
|
- </View>
|
355
|
|
- <View className='tools-item'>
|
356
|
|
- <Image src={require('@assets/agent/banner.png')} className='tools-item-img'></Image>
|
357
|
|
- <Text className='tools-item-txt'>等待助力</Text>
|
358
|
|
- </View>
|
359
|
|
- <View className='tools-item'>
|
360
|
|
- <Image src={require('@assets/agent/banner.png')} className='tools-item-img'></Image>
|
361
|
|
- <Text className='tools-item-txt'>等待助力</Text>
|
362
|
|
- </View>
|
363
|
|
- <View className='tools-item'>
|
364
|
|
- <Image src={require('@assets/agent/banner.png')} className='tools-item-img'></Image>
|
365
|
|
- <Text className='tools-item-txt'>等待助力</Text>
|
366
|
|
- </View>
|
|
387
|
+ {
|
|
388
|
+ times(helpList.length).map((it, inx) => {
|
|
389
|
+ return (
|
|
390
|
+ <View className='tools-item' key={`help-${inx}`}>
|
|
391
|
+ <Image src={it.avatarurl} className='tools-item-img'></Image>
|
|
392
|
+ <Text className='tools-item-txt'>{it.name}</Text>
|
|
393
|
+ </View>
|
|
394
|
+ )
|
|
395
|
+ })
|
|
396
|
+ }
|
|
397
|
+ {
|
|
398
|
+ times(detail.personNum - helpList.length).map((_, inx) => {
|
|
399
|
+ return (
|
|
400
|
+ <View className='tools-item' key={`un-${inx}`}>
|
|
401
|
+ <Image src={defaultAvatar} className='tools-item-img'></Image>
|
|
402
|
+ <Text className='tools-item-txt'>等待助力</Text>
|
|
403
|
+ </View>
|
|
404
|
+ )
|
|
405
|
+ })
|
|
406
|
+ }
|
367
|
407
|
</View>
|
368
|
408
|
</View>
|
369
|
|
- <Button className={true ? "assistance-btn" : "nostart-btn"}>{true ? "邀请好友助力" : "未开始"}</Button>
|
|
409
|
+ <View>
|
|
410
|
+ {
|
|
411
|
+ actState === BeforeStart &&
|
|
412
|
+ (<Button className="nostart-btn">未开始</Button>)
|
|
413
|
+ }
|
|
414
|
+ {
|
|
415
|
+ actState === InProcess && !isStarter &&
|
|
416
|
+ (
|
|
417
|
+ <Block>
|
|
418
|
+ ()
|
|
419
|
+ <Button className="assistance-btn" onClick={this.handleHelp}>立即助力好友</Button>
|
|
420
|
+ <Button className="assistance-btn">发起我的助力</Button>
|
|
421
|
+ </Block>
|
|
422
|
+ )
|
|
423
|
+ }
|
|
424
|
+ <Button disabled={actState != InProcess} className={true ? "assistance-btn" : "nostart-btn"}>{actState === BeforeStart ? '未开始:' : (actState === InProcess ? '邀请好友助力:' : '活动已结束')}</Button>
|
|
425
|
+ </View>
|
370
|
426
|
<View className="assistance-text">活动说明</View>
|
371
|
|
- <Image src={require('@assets/agent/banner.png')}style="width:100%"></Image>
|
|
427
|
+ <Image src={detail.activityInstructions}style="width:100%"></Image>
|
372
|
428
|
</ScrollView>
|
373
|
|
-
|
374
|
429
|
|
375
|
430
|
<View className="chat-entrance" onClick={this.handleMoreClick}>
|
376
|
431
|
<Text className="iconfont icon-chat"></Text>
|
377
|
432
|
</View>
|
378
|
433
|
<BackHomeBtn></BackHomeBtn>
|
379
|
|
-
|
380
|
|
- {/* <View className="bot-nav flex">
|
381
|
|
- {
|
382
|
|
- posterShow && (
|
383
|
|
- <Button className='btn poster-btn' onClick={() => { this.togglePosterStatus(true) }}>
|
384
|
|
- <Image mode="widthFix" src={require('@assets/tupian_3@3x.png')} className="btn-icon"></Image>
|
385
|
|
- <Text className="txt">海报</Text>
|
386
|
|
- </Button>
|
387
|
|
- )
|
388
|
|
- }
|
389
|
|
- <Button className="btn share-btn" open-type="share">
|
390
|
|
- <Image mode="widthFix" src={require('@assets/fasong@3x.png')} className="btn-icon"></Image>
|
391
|
|
- <Text className="txt">分享</Text>
|
392
|
|
- </Button>
|
393
|
|
-
|
394
|
|
- <Button className="btn" onClick={this.handleFavor}>
|
395
|
|
- <Text className={`iconfont ${isSaved ? 'icon-shoucang selected' : 'icon-shoucang1'}`}></Text>
|
396
|
|
- <Text className="txt">收藏</Text>
|
397
|
|
- </Button>
|
398
|
|
- {
|
399
|
|
- detail.enlisted >= detail.enlistNum ? (<Button disabled='true' className='submit-btn hasSigned'>报名人数已满</Button>) : (phone ? (
|
400
|
|
- <Button disabled={isSign} className={`submit-btn ${isSign ? 'hasSigned' : ''}`} onClick={this.handleSignup}>{isSign ? '已报名' : '立即报名'}</Button>
|
401
|
|
- ) : (
|
402
|
|
- <Button disabled={isSign} className='submit-btn' open-type="getPhoneNumber" onGetphonenumber={this.handleGetPhone}>{isSign ? '已报名' : '立即报名'}</Button>
|
403
|
|
- ))
|
404
|
|
- }
|
405
|
|
- {/* {phone ? (
|
406
|
|
- <Button disabled={isSign} className={`submit-btn ${isSign ? 'hasSigned' : ''}`} onClick={this.handleSignup}>{isSign ? '已报名' : '立即报名'}</Button>
|
407
|
|
- ) : (
|
408
|
|
- <Button disabled={isSign} className='submit-btn' open-type="getPhoneNumber" onGetphonenumber={this.handleGetPhone}>{isSign ? '已报名' : '立即报名'}</Button>
|
409
|
|
- )}
|
410
|
|
- </View> */}
|
411
|
|
-
|
412
|
|
- {/* <View className='page-body' style={{ display: this.state.canChoose }}>
|
413
|
|
- <View className="mask" onClick={this.hideModal}></View>
|
414
|
|
- <View className='page-section'>
|
415
|
|
- <Text className="page-section__title">报名信息</Text>
|
416
|
|
- <View className='page-content'>
|
417
|
|
- <Input className='inputName' onInput={this.onInputText.bind(this)} type='text' placeholder='请输入姓名' />
|
418
|
|
- <Picker mode='selector' range={this.state.selector} onChange={this.onChange}>
|
419
|
|
- <View className='picker'>
|
420
|
|
- <Text>参加人数</Text>
|
421
|
|
- <Text className='content'>{this.state.selectorChecked}</Text>
|
422
|
|
- <Text>人</Text>
|
423
|
|
- </View>
|
424
|
|
- </Picker>
|
425
|
|
- <View onClick={this.comfire} className='comfire'>确认</View>
|
426
|
|
- </View>
|
427
|
|
- </View>
|
428
|
|
- </View> */}
|
429
|
434
|
</View>
|
430
|
435
|
)
|
431
|
436
|
}
|
432
|
437
|
</Block>
|
433
|
438
|
)
|
434
|
439
|
}
|
435
|
|
-}
|
|
440
|
+}
|