Browse Source

js兼容性问题: Object.fromEntries

Michael Wang 5 năm trước cách đây
mục cha
commit
8edd8693de
1 tập tin đã thay đổi với 5 bổ sung3 xóa
  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,