wjx 7 месяцев назад
Родитель
Сommit
2d23023da2
2 измененных файлов с 4 добавлено и 8 удалено
  1. 2 6
      config/proxy.ts
  2. 2 2
      src/services/api.ts

+ 2 - 6
config/proxy.ts

@@ -10,20 +10,16 @@
  export default {
   dev: {
     '/api/': {
-      // target: 'http://test.api.zanxiangwl.com',
-      // target: 'https://game.84game.cn',
-      target: 'https://testapi.zanxiangwl.com',
+      target: 'https://api.zanxiangwl.com',
       changeOrigin: true,
       pathRewrite: { '/api': '' },
     },
     '/erpApi/': {
-      target: 'https://testapi.zanxiangwl.com',
-      // target: 'https://api.zanxiangwl.com',
+      target: 'https://api.zanxiangwl.com',
       changeOrigin: true,
       pathRewrite: { '/erpApi': '' },
     },
     '/gameApi/': {
-      // target: 'http://test.api.zanxiangwl.com',//服务器
       target: 'https://game.84game.cn',//服务器
       changeOrigin: true,
       pathRewrite: { '^/gameApi/': '' },

+ 2 - 2
src/services/api.ts

@@ -1,3 +1,3 @@
-export let api: any = process.env.NODE_ENV === 'development' ? 'api' : 'https://testapi.zanxiangwl.com'
-export let erpApi: any = process.env.NODE_ENV === 'development' ? 'erpApi' : 'https://testapi.zanxiangwl.com'
+export let api: any = process.env.NODE_ENV === 'development' ? 'api' : 'https://api.zanxiangwl.com'
+export let erpApi: any = process.env.NODE_ENV === 'development' ? 'erpApi' : 'https://api.zanxiangwl.com'
 export let gameApi: any = process.env.NODE_ENV === 'development' ? 'gameApi' : `https://game.84game.cn`