Browse Source

bug修改

yanym 5 years ago
parent
commit
0b0346afb7

+ 1 - 1
dorm-manager-wx/pages/student/user/user.wxml

@@ -1,6 +1,6 @@
 <view class="list">
   <view class="line">
-    <view>学生姓名:</view>
+    <view>{{student.roleType==10001?'教师':'学生'}}姓名:</view>
     <input value="{{student.name}}"></input>
   </view>
   <view class="line">

+ 5 - 1
dorm-manager-wx/pages/teacher/facephoto/facephoto.js

@@ -103,7 +103,11 @@ Page({
               arrayDept: arrayDept,
               listDept: res.data
             })
-            that.getRegisterInfo();
+            if (that.data.isregiste) {
+              that.getRegisterInfo(0)
+            } else {
+              that.getRegisterInfo(1)
+            }
           }
         }
       } else {

+ 19 - 4
dorm-manager-wx/pages/teacher/statistics/statistics.js

@@ -12,8 +12,8 @@ Page({
   data: {
     userInfo: '',
     totalInfo: '',
-    startDate: '2019-10-29',
-    endDate: '2019-10-29',
+    startDate: '',
+    endDate: '',
     listCollege: '',
     listDept: '',
     userArray: [
@@ -24,6 +24,20 @@ Page({
     weiguiList: []
   },
 
+  getCurrentDate: function(e) {
+    let date = new Date();
+    let year = date.getFullYear();
+    let month = date.getMonth() + 1;
+    let day = date.getDate();
+    month = month < 10 ? "0" + month : month;
+    day = day < 10 ? "0" + day : day;
+    date = year + '-' + month + '-' + day
+    this.setData({
+      startDate: date,
+      endDate: date
+    })
+  },
+
   bindStartDateChange: function(e) {
     this.setData({
       startDate: e.detail.value
@@ -191,7 +205,7 @@ Page({
       page: 1,
       rows: 20
     }, 'post').then(res => {
-
+      weiguiList: res.data.data.data
     })
   },
 
@@ -204,7 +218,7 @@ Page({
       rows: 20
     }, 'post').then(res => {
       that.setData({
-        weiguiList: res.data.data.data
+
       })
     })
   },
@@ -214,6 +228,7 @@ Page({
    */
   onLoad: function(options) {
     const that = this;
+    that.getCurrentDate();
     that.data.userInfo = wx.getStorageSync('user');
     that.getCollegeInfo();
     that.getUnInInfo();