ソースを参照

update: 请求头增加isWeb字段

xyh 2 年 前
コミット
7edea93e25
2 ファイル変更2 行追加1 行削除
  1. 1 0
      packages/app/src/apis/request.ts
  2. 1 1
      packages/app/src/utils/constants.ts

+ 1 - 0
packages/app/src/apis/request.ts

@@ -24,6 +24,7 @@ http.interceptors.request.use(function(config) {
   const {token, id} = userStore.getState();
   config.headers.token = token;
   config.headers.userId = String(id);
+  config.headers.isWeb = '1';
 
   return config;
 });

+ 1 - 1
packages/app/src/utils/constants.ts

@@ -32,7 +32,7 @@ export const MODAL_PAGE_SIZE_LIST = ['5', ...PAGE_SIZE_LIST];
 /** 请求域名 */
 export const NETWORK_URL
   = process.env.NODE_ENV === 'development'
-    ? 'http://192.168.0.118:9560'
+    ? 'https://7cb7b084.r6.cpolar.top'
     : 'http://10.2.111.91:9560';
 export const E2E_NETWORK_URL = 'http://e2e.test.cn';
 /** 导出错误提示 */