소스 검색

请求头page改成page-type

wangfumin 1 개월 전
부모
커밋
de3caa29de
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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';
   }