Browse Source

Changed on Login Stuff and visibility control.

jason.lu 6 years ago
parent
commit
072a6b6283
1 changed files with 6 additions and 1 deletions
  1. 6 1
      js/entrance.js

+ 6 - 1
js/entrance.js

@@ -147,7 +147,12 @@ function send_remain(a, b) {
 function on_receive_exist(objs, sta){
     let obj = first_parse(this, objs);
     console.log(obj);
-    if(obj != null && obj != undefined && obj.list != null && obj.list != undefined && obj.list.length > 0){
+    if(obj != null && obj != undefined && obj.list != null){
+        if(obj.list.length == 0){
+            wholehtml += "当前没有正在进行的班次!";
+            send_remain(wholehtml);
+            return;
+        }
         let i = 0;
         let wholehtml = "正在进行的班次: <br>";
         for(i=0;i<obj.list.length;i++){