Browse Source

Merge branch 'v3.5.1' of http://git.ycjcjy.com/zhiyuxing/miniapp-v3 into v3.5.1

张延森 5 years ago
parent
commit
f7ce74a6eb
2 changed files with 13 additions and 5 deletions
  1. 2
    2
      config/dev.js
  2. 11
    3
      src/pages/checkin/index.js

+ 2
- 2
config/dev.js View File

9
     WSS_HOST: '"wss://dev.jinchengjiaye.com"',
9
     WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
     // HOST: '"https://lt.pawoma.cn"',
10
     // HOST: '"https://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
11
     // WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    // HOST: '"http://192.168.0.84:8080"',
13
-    // WSS_HOST: '"ws://192.168.0.84:8080"',
12
+    // HOST: '"http://192.168.0.218:8080"',
13
+    // WSS_HOST: '"ws://192.168.0.218:8080"',
14
   },
14
   },
15
   weapp: {},
15
   weapp: {},
16
   h5: {}
16
   h5: {}

+ 11
- 3
src/pages/checkin/index.js View File

16
   }
16
   }
17
 
17
 
18
   componentWillMount () {
18
   componentWillMount () {
19
+    
20
+
21
+
19
     const router = Taro.getStorageSync('router')
22
     const router = Taro.getStorageSync('router')
20
     console.log('router---', parseQueryString)
23
     console.log('router---', parseQueryString)
21
     console.log(router)
24
     console.log(router)
22
     // const id = router.query.paramsId
25
     // const id = router.query.paramsId
23
     // const type = router.query.type || ''
26
     // const type = router.query.type || ''
24
 
27
 
25
-    const { id = router.query.paramsId, type = router.query.type || '' } = parseQueryString(router.query.params)
28
+    const { id = router.query.id , type = router.query.type || '' } = parseQueryString(router.query.params)
26
     console.log(id, 'id-----')
29
     console.log(id, 'id-----')
27
     this.setState({ id, type })
30
     this.setState({ id, type })
28
-    this.getcheckinDetails(id, type)
31
+    
29
 
32
 
30
 
33
 
34
+  }
35
+
36
+  componentDidShow(){
37
+    const { id , type } = this.state
38
+this.getcheckinDetails(id, type)
31
   }
39
   }
32
   // dynamicId
40
   // dynamicId
33
   getcheckinDetails (id, type) {
41
   getcheckinDetails (id, type) {
58
         title: `失败: ${err.message}`,
66
         title: `失败: ${err.message}`,
59
         icon: 'none'
67
         icon: 'none'
60
       })
68
       })
61
-
69
+    
62
       console.error(err)
70
       console.error(err)
63
     })
71
     })
64
   }
72
   }