yuantianjiao 6 anni fa
parent
commit
71c0d4f3e1
3 ha cambiato i file con 4 aggiunte e 5 eliminazioni
  1. 1
    1
      config/index.js
  2. 1
    2
      src/pages/test/test.vue
  3. 2
    2
      src/util/api.js

+ 1
- 1
config/index.js Vedi File

@@ -11,7 +11,7 @@ module.exports = {
11 11
     assetsPublicPath: '/',
12 12
     proxyTable: {
13 13
       '/api': {
14
-        target: 'https://dp.huiju360.com.cn/hj_operations', // 接口的域名
14
+        target: 'http://192.168.0.62:8080/api', // 接口的域名
15 15
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
16 16
         pathRewrite: {
17 17
           '^/api': ''

+ 1
- 2
src/pages/test/test.vue Vedi File

@@ -18,8 +18,7 @@ export default {
18 18
     this.$ajax(this.$api.test.area.url, {
19 19
       method: 'GET',
20 20
       data: {
21
-        a: 1,
22
-        b: 2
21
+        caseid: 1
23 22
       }
24 23
     })
25 24
       .then(res => {

+ 2
- 2
src/util/api.js Vedi File

@@ -1,10 +1,10 @@
1
-const baseUrl = process.env.NODE_ENV === 'development' ? '/api' : 'https://dp.huiju360.com.cn/hj_operations'
1
+const baseUrl = process.env.NODE_ENV === 'development' ? '/api' : 'http://192.168.0.62:8080/api'
2 2
 // const baseUrl = '/check-api'
3 3
 const $api = {
4 4
   test: { // 测试接口
5 5
     area: {
6 6
       method: 'get',
7
-      url: `${baseUrl}/machine/area`
7
+      url: `${baseUrl}/common/goodstype`
8 8
     }
9 9
   }
10 10
 }