xujing преди 5 години
родител
ревизия
2c80fcd39a
променени са 7 файла, в които са добавени 37 реда и са изтрити 25 реда
  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 Целия файл

@@ -5,13 +5,13 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://47.101.36.130:8085"',//测试
7 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 10
     // HOST: '"https://lt.pawoma.cn"',
11 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 16
   weapp: {},
17 17
   h5: {}

+ 5
- 5
config/prod.js Целия файл

@@ -5,11 +5,11 @@ module.exports = {
5 5
   defineConstants: {
6 6
     // HOST: '"http://192.168.0.218:8080"',
7 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 14
   weapp: {},
15 15
   h5: {}

+ 2
- 2
project.config.json Целия файл

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

+ 3
- 0
src/app.scss Целия файл

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

+ 8
- 5
src/pages/project/h5Page.js Целия файл

@@ -241,12 +241,13 @@ export default class Index extends Component {
241 241
   }
242 242
   // 报备客户
243 243
   reportClient() {
244
+
244 245
     const router = Taro.getStorageSync('router')
245 246
     const consultant = this.$router.params.consultant || router.query.consultant || ""
246 247
     const {
247 248
       userInfo: { person: { phone, tel, userId } }
248 249
     } = this.props
249
-
250
+    // debugger
250 251
     if (consultant && consultant != userId) {
251 252
       const realPhone = phone || tel
252 253
       const payload = {
@@ -254,13 +255,15 @@ export default class Index extends Component {
254 255
         phone: realPhone,
255 256
         showToast: false
256 257
       }
258
+
257 259
       reportClient(payload).then(res => {
258 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 Целия файл

@@ -81,6 +81,9 @@ export default class Index extends Component {
81 81
     })
82 82
   }
83 83
   componentDidShow() {
84
+    Taro.showTabBar({
85
+      animation: false
86
+    })
84 87
     if (this.props.curCity.id) {
85 88
       ready.queue(() => {
86 89
         // debugger

+ 11
- 8
src/utils/request.js Целия файл

@@ -27,7 +27,9 @@ export const setStorage = function (key, data) {
27 27
  * @param {*} options
28 28
  */
29 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 33
   return Taro.request({
32 34
     url,
33 35
     method,
@@ -44,7 +46,6 @@ export const fetch = async (options) => {
44 46
         title: "请检查网络",
45 47
         icon: 'none'
46 48
       })
47
-
48 49
       console.error(res)
49 50
       throw new Error('请检查网络')
50 51
     }
@@ -63,14 +64,14 @@ export const fetch = async (options) => {
63 64
           })
64 65
         })
65 66
       } else {
66
-        if (showToast) {
67
+        if (showMessage) {
67 68
           Taro.showToast({
68 69
             title: defaultMsg,
69 70
             icon: 'none'
70 71
           })
71 72
         }
72 73
       }
73
-      if (showToast) {
74
+      if (showMessage) {
74 75
 
75 76
         Taro.showToast({
76 77
           title: message,
@@ -91,11 +92,13 @@ export const fetch = async (options) => {
91 92
     if (err.message) {
92 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 103
     throw new Error(errMessage)
101 104
   })