yuantianjiao 6 anni fa
parent
commit
77b577a790
3 ha cambiato i file con 12 aggiunte e 6 eliminazioni
  1. 4
    0
      src/common/css/reset.css
  2. 6
    4
      src/util/ajax.js
  3. 2
    2
      vue.config.js

+ 4
- 0
src/common/css/reset.css Vedi File

@@ -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
 }

+ 6
- 4
src/util/ajax.js Vedi File

@@ -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)

+ 2
- 2
vue.config.js Vedi File

@@ -25,8 +25,8 @@ module.exports = {
25 25
       // '/api-v2': {
26 26
       '/api': {
27 27
         // target: 'https://dp.huiju360.com.cn/hj_operations',
28
-        // target: 'http://192.168.0.62:8080', //wf
29
-        target: 'http://192.168.0.11', //ys
28
+        target: 'http://192.168.0.62:8080', //wf
29
+        // target: 'http://192.168.0.11', //ys
30 30
         // target: 'http://dev.ycjcjy.com', //frp
31 31
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
32 32
         // pathRewrite: {