Przeglądaj źródła

fix fetch upyun cors error

Michael Wang 5 lat temu
rodzic
commit
a0548c4070
1 zmienionych plików z 4 dodań i 6 usunięć
  1. 4 6
      src/features/Login/Login.vue

+ 4 - 6
src/features/Login/Login.vue

@@ -409,16 +409,14 @@ export default {
             ? "https://ecs-static.qmth.com.cn"
             : "https://ecs-test-static.qmth.com.cn";
 
-        let myHeaders = new Headers();
-        myHeaders.append("Cache-Control", "no-cache");
         const res = await fetch(
           fileSever +
             "/org_properties/byOrgDomain/" +
             this.domainInUrl +
-            "/studentClientConfig.json",
-          {
-            headers: myHeaders,
-          }
+            "/studentClientConfig.json" +
+            "?" +
+            Date.now() +
+            Math.random()
         );
         if (res.ok) {
           const json = await res.json();