Selaa lähdekoodia

Merge branch 'dev' of http://git.ycjcjy.com/SpaceOfCheng/wechat into dev

许成详 6 vuotta sitten
vanhempi
commit
c94080408b
3 muutettua tiedostoa jossa 11 lisäystä ja 5 poistoa
  1. 4
    0
      src/common/css/reset.css
  2. 1
    1
      src/pages/user/mainPage/userCenter/index.vue
  3. 6
    4
      src/util/ajax.js

+ 4
- 0
src/common/css/reset.css Näytä tiedosto

@@ -69,4 +69,8 @@ select option {
69 69
 
70 70
 .van-picker{
71 71
 	z-index: 101;
72
+}
73
+
74
+.van-toast i{
75
+	color: white;
72 76
 }

+ 1
- 1
src/pages/user/mainPage/userCenter/index.vue Näytä tiedosto

@@ -80,7 +80,7 @@ export default {
80 80
 
81 81
   },
82 82
   mounted () {
83
-    this.$nextTick(() => {
83
+    this.getUserInfo({ org: this.org }).then(() => {
84 84
       if (this.userInfo != 406) {
85 85
         this.user = this.userInfo.customer
86 86
         this.AccountInfo = JSON.parse(this.user.AccountInfo)

+ 6
- 4
src/util/ajax.js Näytä tiedosto

@@ -17,7 +17,7 @@ const Axios = axios.create({
17 17
 
18 18
 Axios.interceptors.request.use((config) => {
19 19
   // 处理请求data,若为get请求,拼到url后面,若为post请求,直接添加到body中
20
-  config.urlData = {...config.urlData, org: 'MQ'}
20
+  config.urlData = { ...config.urlData, org: 'MQ' }
21 21
   let urlData = qs.stringify(config.urlData)
22 22
   let queryData = qs.stringify(config.queryData)
23 23
   // 判断是通过斜杠传参还是通过query传参
@@ -64,9 +64,11 @@ const ajax = (...args) => {
64 64
         // }
65 65
         resolve(code)
66 66
       } else {
67
-        Toast({
68
-          message: message,
69
-          type: 'error'
67
+        console.log(message)
68
+        Toast.fail({
69
+          duration: 2000, // 持续展示 toast
70
+          forbidClick: true, // 禁用背景点击
71
+          message: message
70 72
         })
71 73
       }
72 74
     }).catch(reject)