Browse Source

学校二维码只选择一个

zwq 2 years ago
parent
commit
c51697f24d
1 changed files with 12 additions and 6 deletions
  1. 12 6
      nngkxxdp/src/main/resources/static/school/school.html

+ 12 - 6
nngkxxdp/src/main/resources/static/school/school.html

@@ -350,13 +350,19 @@
         }
     }
     function clickQRCode(number) {
-        str = "#ewmNumber" + number
-        if ($(str).css("display") == 'none') {
-            $(str).css("display", "block");
-        } else {
-            $(str).css("display", "none");
+        for(var i=0;i<schoolData.length;i++) {
+            if (i!=number) {
+                str = "#ewmNumber" + i
+                $(str).css("display", "none");
+            } else {
+                str = "#ewmNumber" + number
+                if ($(str).css("display") == 'none') {
+                    $(str).css("display", "block");
+                } else {
+                    $(str).css("display", "none");
+                }
+            }
         }
-
     }
     function gotoOfficial(number) {
         if (schoolData[number].website != null) {