2 Commits 3d130f0ebc ... a755ea63ac

Autor SHA1 Mensaje Fecha
  tiedan a755ea63ac Merge branch 'hou' of http://git.cc-lotus.info/ssfg/OnlineTraining0622 into hou hace 4 años
  tiedan ab63ed40be fix 修复班级页载入bug hace 4 años
Se han modificado 2 ficheros con 22 adiciones y 8 borrados
  1. 19 7
      pages/myClass/myClass.js
  2. 3 1
      pages/myClass/myClass.wxss

+ 19 - 7
pages/myClass/myClass.js

@@ -59,10 +59,14 @@ Page({
           })
           this.isClass(sessionKey)
         } else {
+          wx.hideLoading();
           this.setData({
             isRz: true
           })
         }
+      },
+      fail:()=>{
+         wx.hideLoading()
       }
     })
   },
@@ -88,7 +92,7 @@ Page({
         sessionKey
       },
       success: (res) => {
-
+        wx.hideLoading()
         if (res.data.code == 0) {
           let classInfo = res.data.data;
           classInfo.clasBegin = app.timeFmt(classInfo.clasBegin, "yyyy\/MM\/dd hh:mm ");
@@ -163,6 +167,9 @@ Page({
             return false;
           }
         }
+      },
+      fail:()=>{
+        wx.hideLoading();
       }
     })
   },
@@ -1138,10 +1145,11 @@ Page({
 
 
   onUnload() {
-    this.setData({ cardVis: false,pageNum:1,stuInfo:{} });
+    this.setData({ cardVis: false });
   },
   onHide() {
-    this.setData({ cardVis: false,pageNum:1,stuInfo:{} });
+  
+    this.setData({ cardVis: false   });
   },
   studentList(page) {
     var that = this;
@@ -1287,12 +1295,16 @@ Page({
   //   },
   async onShow() {
     console.log(app.globalData.imgUrl);
+    wx.showLoading({
+      title: '正在加载',
+    })
+    this.setData({ cardVis: false,   classVis: false,
+      classErrVis: false,
+      classNVis: false,pageNum:1,stuInfo:{} });
     var that = this;
-    // wx.showLoading({
-    //   title: '加载中',
-    //   mask:true
-    // })
+  
     const sessionKey = await tools.checkSessionAndLogin();
+   
     this.setData({
       sessionKey
     });

+ 3 - 1
pages/myClass/myClass.wxss

@@ -3,6 +3,7 @@ page{
   font-family: "SourceHanSansCN-Medium"
 } */
 page{
+  
   background-color: #f8f8f8;
 }
 .nr_box {
@@ -567,12 +568,13 @@ page{
   height: 400rpx;
   background-color: #fff;
   border-radius: 20rpx;
+  box-shadow: #000000 rpx 2rpx 30rpx;
 }
 .card_close{
   width:100rpx;
   height:100rpx;
   border-radius: 100rpx;
-  background-color: #ffffff;
+  background-color: #cccccc;
   display: flex;
   justify-content: center;
   align-items: center;