Explorar o código

js兼容性问题: Object.fromEntries

Michael Wang %!s(int64=5) %!d(string=hai) anos
pai
achega
8edd8693de
Modificáronse 1 ficheiros con 5 adicións e 3 borrados
  1. 5 3
      src/features/Login/StudentAccess.vue

+ 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,