Kaynağa Gözat

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

张延森 5 yıl önce
ebeveyn
işleme
f7ce74a6eb
2 değiştirilmiş dosya ile 13 ekleme ve 5 silme
  1. 2
    2
      config/dev.js
  2. 11
    3
      src/pages/checkin/index.js

+ 2
- 2
config/dev.js Dosyayı Görüntüle

@@ -9,8 +9,8 @@ module.exports = {
9 9
     WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10 10
     // HOST: '"https://lt.pawoma.cn"',
11 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 15
   weapp: {},
16 16
   h5: {}

+ 11
- 3
src/pages/checkin/index.js Dosyayı Görüntüle

@@ -16,18 +16,26 @@ export default class checkin extends Component {
16 16
   }
17 17
 
18 18
   componentWillMount () {
19
+    
20
+
21
+
19 22
     const router = Taro.getStorageSync('router')
20 23
     console.log('router---', parseQueryString)
21 24
     console.log(router)
22 25
     // const id = router.query.paramsId
23 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 29
     console.log(id, 'id-----')
27 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 40
   // dynamicId
33 41
   getcheckinDetails (id, type) {
@@ -58,7 +66,7 @@ export default class checkin extends Component {
58 66
         title: `失败: ${err.message}`,
59 67
         icon: 'none'
60 68
       })
61
-
69
+    
62 70
       console.error(err)
63 71
     })
64 72
   }