zhengnaiwen_citu 1 рік тому
батько
коміт
8d6f70dc36
2 змінених файлів з 4 додано та 6 видалено
  1. 1 4
      src/api/position.js
  2. 3 2
      src/config/axios/index.js

+ 1 - 4
src/api/position.js

@@ -44,10 +44,7 @@ export const getSimilarPosition = async (params) => {
 export const getJobAdvertisedSearch = async (params) => {
   return await request.get({
     url: '/app-api/menduner/system/job/advertised/search',
-    params,
-    headers: {
-      'CaChe-Control': 'no-store'
-    }
+    params
   })
 }
 

+ 3 - 2
src/config/axios/index.js

@@ -5,7 +5,7 @@ import { config } from './config'
 const { default_headers } = config
 
 const request = (option) => {
-  const { url, method, params, data, headersType, responseType, headers, ...config } = option
+  const { url, method, params, data, headersType, responseType, ...config } = option
   return service({
     url: url,
     method,
@@ -14,7 +14,8 @@ const request = (option) => {
     ...config,
     responseType: responseType,
     headers: {
-      ...headers,
+      'If-None-Match': false,
+      'Cache-Control': 'no-store', // 全局设置不使用缓存
       'Content-Type': headersType || default_headers
     }
   })