Przeglądaj źródła

请求头page改成page-type

wangfumin 3 tygodni temu
rodzic
commit
de3caa29de
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      src/request/index.ts

+ 1 - 1
src/request/index.ts

@@ -52,7 +52,7 @@ axios.interceptors.request.use(async (config) => {
   // 进入编辑页时判断是否editOrShow,添加参数
   const isEditOrShow = currentRoute?.query?.editOrShow;
   if (isEditOrShow) {
-    isEditOrShow == 'show' ? config.headers.page = 'view' : config.headers.page = 'edit';
+    isEditOrShow == 'show' ? config.headers['page-type'] = 'view' : config.headers['page-type'] = 'edit';
   }