Selaa lähdekoodia

axios => fetch

Michael Wang 6 vuotta sitten
vanhempi
commit
04d2f958d1
1 muutettua tiedostoa jossa 2 lisäystä ja 2 poistoa
  1. 2 2
      src/features/Login/Login.vue

+ 2 - 2
src/features/Login/Login.vue

@@ -158,11 +158,11 @@ export default {
     });
     });
 
 
     try {
     try {
-      const res = await this.$http.get(
+      const res = await fetch(
         "/api/ecs_core/org/propertyNoSession/OE_STUDENT_SYS_NAME?domainName=" +
         "/api/ecs_core/org/propertyNoSession/OE_STUDENT_SYS_NAME?domainName=" +
           this.schoolDomain
           this.schoolDomain
       );
       );
-      const productName = res.data;
+      const productName = await res.text();
       this.productName = productName || "远程教育网络考试";
       this.productName = productName || "远程教育网络考试";
     } catch (e) {
     } catch (e) {
       this.productName = "远程教育网络考试";
       this.productName = "远程教育网络考试";