yanym 5 år sedan
förälder
incheckning
91ce8b7b2c
1 ändrade filer med 7 tillägg och 3 borttagningar
  1. 7 3
      dorm-manager-wx/pages/teacher/visitorcheck/visitorcheck.js

+ 7 - 3
dorm-manager-wx/pages/teacher/visitorcheck/visitorcheck.js

@@ -9,7 +9,7 @@ Page({
    * 页面的初始数据
    */
   data: {
-    apiTotal:'',
+    apiTotal: '',
     isregiste: true,
     approvalNum: 0,
     approvedNum: 0,
@@ -76,7 +76,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function(options) {
-    
+
   },
 
   /**
@@ -94,7 +94,11 @@ Page({
     that.setData({
       apiTotal: api.total.substring(0, api.total.length - 4)
     })
-    that.getVisitorCheckInfo(2);
+    if (that.data.isregiste) {
+      that.getVisitorCheckInfo(2);
+    } else {
+      that.getVisitorCheckInfo(4);
+    }
   },
 
   /**