xujing 5 years ago
parent
commit
2c80fcd39a
7 changed files with 37 additions and 25 deletions
  1. 5
    5
      config/dev.js
  2. 5
    5
      config/prod.js
  3. 2
    2
      project.config.json
  4. 3
    0
      src/app.scss
  5. 8
    5
      src/pages/project/h5Page.js
  6. 3
    0
      src/pages/project/index.js
  7. 11
    8
      src/utils/request.js

+ 5
- 5
config/dev.js View File

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://47.101.36.130:8085"',//测试
6
     // HOST: '"http://47.101.36.130:8085"',//测试
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
7
     // WSS_HOST: '"wss://47.101.36.130:8085"',
8
-    // HOST: '"https://dev.jinchengjiaye.com"',//测试
9
-    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
8
+    HOST: '"https://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.2.52:8080"',
13
-    WSS_HOST: '"ws://192.168.2.52:8080"',
14
-    Version:'V3.5.2.2_12102'
12
+    // HOST: '"http://192.168.2.52:8080"',
13
+    // WSS_HOST: '"ws://192.168.2.52:8080"',
14
+    Version: 'V3.5.2.2_121112'
15
   },
15
   },
16
   weapp: {},
16
   weapp: {},
17
   h5: {}
17
   h5: {}

+ 5
- 5
config/prod.js View File

5
   defineConstants: {
5
   defineConstants: {
6
     // HOST: '"http://192.168.0.218:8080"',
6
     // HOST: '"http://192.168.0.218:8080"',
7
     // WSS_HOST: '"ws://192.168.0.218:8080"',
7
     // WSS_HOST: '"ws://192.168.0.218:8080"',
8
-    // HOST: '"https://dev.jinchengjiaye.com"',//测试
9
-    // WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
-    HOST: '"https://lt.pawoma.cn"',
11
-    WSS_HOST: '"wss://lt.pawoma.cn"',
12
-    Version:'V3.5.2.2_2019-12-10'
8
+    HOST: '"https://dev.jinchengjiaye.com"',//测试
9
+    WSS_HOST: '"wss://dev.jinchengjiaye.com"',
10
+    // HOST: '"https://lt.pawoma.cn"',
11
+    // WSS_HOST: '"wss://lt.pawoma.cn"',
12
+    Version:'V3.5.2.2_2019-12-11'
13
   },
13
   },
14
   weapp: {},
14
   weapp: {},
15
   h5: {}
15
   h5: {}

+ 2
- 2
project.config.json View File

1
 {
1
 {
2
 	"miniprogramRoot": "dist/",
2
 	"miniprogramRoot": "dist/",
3
 	"projectname": "mini-chengjiao",
3
 	"projectname": "mini-chengjiao",
4
-	"description": "尾房宝",
5
-	"appid": "wx755faa4b3ec76cd3",
4
+	"description": "知与行联调",
5
+	"appid": "wxd9ee3a9480a4e544",
6
 	"setting": {
6
 	"setting": {
7
 		"urlCheck": false,
7
 		"urlCheck": false,
8
 		"es6": false,
8
 		"es6": false,

+ 3
- 0
src/app.scss View File

58
       color: #666;
58
       color: #666;
59
     }
59
     }
60
   }
60
   }
61
+}
62
+.wxParse-inline {
63
+  line-height: 50px;
61
 }
64
 }

+ 8
- 5
src/pages/project/h5Page.js View File

241
   }
241
   }
242
   // 报备客户
242
   // 报备客户
243
   reportClient() {
243
   reportClient() {
244
+
244
     const router = Taro.getStorageSync('router')
245
     const router = Taro.getStorageSync('router')
245
     const consultant = this.$router.params.consultant || router.query.consultant || ""
246
     const consultant = this.$router.params.consultant || router.query.consultant || ""
246
     const {
247
     const {
247
       userInfo: { person: { phone, tel, userId } }
248
       userInfo: { person: { phone, tel, userId } }
248
     } = this.props
249
     } = this.props
249
-
250
+    // debugger
250
     if (consultant && consultant != userId) {
251
     if (consultant && consultant != userId) {
251
       const realPhone = phone || tel
252
       const realPhone = phone || tel
252
       const payload = {
253
       const payload = {
254
         phone: realPhone,
255
         phone: realPhone,
255
         showToast: false
256
         showToast: false
256
       }
257
       }
258
+
257
       reportClient(payload).then(res => {
259
       reportClient(payload).then(res => {
258
         console.log('恭喜您绑定成功')
260
         console.log('恭喜您绑定成功')
259
-      })
260
-      // .catch(err => {
261
-      //   console.error(err)
261
+        
262
+      }).catch(err => {
263
+        // debugger
264
+        console.error(err)
262
 
265
 
263
-      // })
266
+      })
264
     }
267
     }
265
   }
268
   }
266
 
269
 

+ 3
- 0
src/pages/project/index.js View File

81
     })
81
     })
82
   }
82
   }
83
   componentDidShow() {
83
   componentDidShow() {
84
+    Taro.showTabBar({
85
+      animation: false
86
+    })
84
     if (this.props.curCity.id) {
87
     if (this.props.curCity.id) {
85
       ready.queue(() => {
88
       ready.queue(() => {
86
         // debugger
89
         // debugger

+ 11
- 8
src/utils/request.js View File

27
  * @param {*} options
27
  * @param {*} options
28
  */
28
  */
29
 export const fetch = async (options) => {
29
 export const fetch = async (options) => {
30
-  const { url, payload, method = 'GET', showToast = true, autoLogin = true } = options
30
+  const { url, payload = {}, method = 'GET', showToast = true, autoLogin = true } = options
31
+  const showMessage = Object.prototype.hasOwnProperty.call(payload, 'showToast') ? payload.showToast : showToast
32
+  // debugger
31
   return Taro.request({
33
   return Taro.request({
32
     url,
34
     url,
33
     method,
35
     method,
44
         title: "请检查网络",
46
         title: "请检查网络",
45
         icon: 'none'
47
         icon: 'none'
46
       })
48
       })
47
-
48
       console.error(res)
49
       console.error(res)
49
       throw new Error('请检查网络')
50
       throw new Error('请检查网络')
50
     }
51
     }
63
           })
64
           })
64
         })
65
         })
65
       } else {
66
       } else {
66
-        if (showToast) {
67
+        if (showMessage) {
67
           Taro.showToast({
68
           Taro.showToast({
68
             title: defaultMsg,
69
             title: defaultMsg,
69
             icon: 'none'
70
             icon: 'none'
70
           })
71
           })
71
         }
72
         }
72
       }
73
       }
73
-      if (showToast) {
74
+      if (showMessage) {
74
 
75
 
75
         Taro.showToast({
76
         Taro.showToast({
76
           title: message,
77
           title: message,
91
     if (err.message) {
92
     if (err.message) {
92
       errMessage = err.message
93
       errMessage = err.message
93
     }
94
     }
95
+    if (showMessage) {
94
 
96
 
95
-    Taro.showToast({
96
-      title: errMessage,
97
-      icon: 'none'
98
-    })
97
+      Taro.showToast({
98
+        title: errMessage,
99
+        icon: 'none'
100
+      })
101
+    }
99
 
102
 
100
     throw new Error(errMessage)
103
     throw new Error(errMessage)
101
   })
104
   })