소스 검색

buile——1

xvying 1 년 전
부모
커밋
d8d4e59dbd
2개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 0 0
      online/static/js/app.js
  2. 8 8
      src/utils/request.js

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
online/static/js/app.js


+ 8 - 8
src/utils/request.js

@@ -22,14 +22,14 @@ const service = axios.create({
 service.interceptors.request.use(
   (config) => {
     // do something before request is sent
-    // if (config.method.toUpperCase() == "PUT") {
-    //   config.method = "POST";
-    //   config.headers["X-HTTP-Method-Override"] = "PUT";
-    // }
-    // if (config.method.toUpperCase() == "DELETE") {
-    //   config.method = "POST";
-    //   config.headers["X-HTTP-Method-Override"] = "DELETE";
-    // }
+    if (config.method.toUpperCase() == "PUT") {
+      config.method = "POST";
+      config.headers["X-HTTP-Method-Override"] = "PUT";
+    }
+    if (config.method.toUpperCase() == "DELETE") {
+      config.method = "POST";
+      config.headers["X-HTTP-Method-Override"] = "DELETE";
+    }
     if (store.getters.token) {
       // let each request carry token
       // ['X-Token'] is a custom headers key

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.