Эх сурвалжийг харах

js兼容性问题: Object.fromEntries

Michael Wang 5 жил өмнө
parent
commit
8edd8693de

+ 5 - 3
src/features/Login/StudentAccess.vue

@@ -9,9 +9,11 @@ export default {
   name: "StudentAccess",
   async mounted() {
     const search = location.search;
-    const obj = Object.fromEntries(
-      new URLSearchParams(location.search).entries()
-    );
+    let obj = {};
+    for (const [k, v] of new URLSearchParams(location.search).entries()) {
+      obj[k] = v;
+    }
+
     const {
       accountType,
       accountValue,