Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	.idea/workspace.xml
wushaodong 3 years ago
parent
commit
c70bfc9bb2
2 changed files with 6 additions and 3 deletions
  1. 1 1
      js/exam_detail.js
  2. 5 2
      js/exam_list.js

+ 1 - 1
js/exam_detail.js

@@ -4,7 +4,7 @@ $(function () {
     let list_item = $(item).find(".list-item");
     list_item.click(function (e) {
       if (e.target.className != "blue" && $(e.target).parent()[0].className == "p") {
-        $("#toast").addClass("show")
+        $("#toast").show();
         return false;
       }
       if (!$(this).data("href")) return false;

+ 5 - 2
js/exam_list.js

@@ -11,12 +11,15 @@ $(function () {
   }
   let grade = $(my_nav_lis[id]).data("id"), lock = false, currentPage = 3, totalPage = 3, type = $(my_nav_lis[id]), zlock = "数据加载中...";
   my_nav.click(function (e) {
+    $(".my-loading").hide();
     if (e.target.className == "my-nav") return false;
     let active = Array.prototype.slice.call($(this).find("li")).indexOf(e.target);
     if (active == globaldata.active) return false;
     globaldata.active = active;
     type = $(e.target);
-    z_lock = type.data("zlock") || zlock;
+    let i = type.data("zlock");
+    i ? $(".my-loading").show() : '';
+    z_lock = i || zlock;
     $(".my-loading").html(z_lock).hide();
     currentPage = type.data("currentPage") || 3;
     totalPage = type.data("totalPage") || 3;
@@ -95,4 +98,4 @@ $(function () {
   $("#nav-sm").click(function () {
     $(".my-province div[data-province='true']").hide();
   })
-})
+})