|
@@ -24,9 +24,24 @@ export default class checkin extends Component {
|
24
|
24
|
const router = Taro.getStorageSync('router')
|
25
|
25
|
|
26
|
26
|
const { id = router.query.id, type = router.query.type || '' } = parseQueryString(router.query.params)
|
|
27
|
+
|
|
28
|
+ if (!id) {
|
|
29
|
+ getQrCodeParams(this.$router.params.scene).then(res => {
|
|
30
|
+ this.setState({ id: res.id, type: res.type }, () => {
|
|
31
|
+ this.setState({ id, type })
|
|
32
|
+ this.getcheckinDetails(id, type)
|
|
33
|
+ })
|
|
34
|
+ }).catch(err => {
|
|
35
|
+ Taro.showToast({
|
|
36
|
+ title: '没有找到活动',
|
|
37
|
+ icon: 'none'
|
|
38
|
+ })
|
|
39
|
+ })
|
|
40
|
+ } else {
|
|
41
|
+ this.setState({ id, type })
|
|
42
|
+ this.getcheckinDetails(id, type)
|
|
43
|
+ }
|
27
|
44
|
console.log(id, 'id-----')
|
28
|
|
- this.setState({ id, type })
|
29
|
|
- this.getcheckinDetails(id, type)
|
30
|
45
|
|
31
|
46
|
// const routers = wx.getLaunchOptionsSync()
|
32
|
47
|
|
|
@@ -59,7 +74,7 @@ export default class checkin extends Component {
|
59
|
74
|
// console.log(id, 'id-----')
|
60
|
75
|
// this.setState({ id, type })
|
61
|
76
|
componentDidShow () {
|
62
|
|
- const { id, type } = this.state
|
|
77
|
+ // const { id, type } = this.state
|
63
|
78
|
// this.getcheckinDetails(id, type)
|
64
|
79
|
}
|
65
|
80
|
// dynamicId
|