Browse Source

切换成宿迁外网

wenhongquan 3 years ago
parent
commit
4e137503d1
2 changed files with 7 additions and 2 deletions
  1. 6 1
      src/utils/request.ts
  2. 1 1
      vite.config.ts

+ 6 - 1
src/utils/request.ts

@@ -5,9 +5,13 @@ import useMainStore from '@/store/useMainStore';
 import { BaseLoginUrl, DA_HUA_URL_PREFIX } from '@/constants/constants';
 import { useDaHuaStore } from '@/store';
 
+// const baseURL =
+//   process.env.NODE_ENV === 'production'
+//     ? 'http://sqpcbg.xt.wenhq.top:8083/api'
+//     : '/api';
 const baseURL =
   process.env.NODE_ENV === 'production'
-    ? 'http://sqpcbg.xt.wenhq.top:8083/api'
+    ? 'http://61.147.254.211:30876/YJZH-SQ/api'
     : '/api';
 
 const CancelToken = axios.CancelToken;
@@ -97,6 +101,7 @@ export default function request<T>(
     headers: {
       Accept: 'application/json',
       'Content-Type': 'application/json',
+      AppId: '3bcb760743ea456faba29a1dfb247bf4',
       Authorization:
         'Bearer ' + window.localStorage.getItem('Authorization') ?? '',
       ...confifg.headers,

+ 1 - 1
vite.config.ts

@@ -26,7 +26,7 @@ export default ({ command, mode }: ConfigEnv): UserConfigExport => {
       force: true,
       proxy: {
         '/api': {
-          target: 'http://sqpcbg.xt.wenhq.top:8083',
+          target: 'http://61.147.254.211:30876/YJZH-SQ/',
           changeOrigin: true,
           // rewrite: (path) => path.replace(/^\/api/, ''),
         },