Browse Source

首页提示,时间精确到秒

yanym 5 years ago
parent
commit
352ce183fd

+ 5 - 7
dorm-manager-wx/pages/student/menu/menu.js

@@ -74,7 +74,7 @@ Page({
       }
     ],
     listTeacher: [{
-      'title': '预提醒',
+      'title': '预提醒',
       nav: 'yujing-2',
       url: 'warning'
     }, {
@@ -89,12 +89,10 @@ Page({
     }]
   },
   check: function() {
-    if (this.data.userInfo.roleType == 10002) {
-      wx.showToast({
-        title: '开发维护中',
-        icon: 'none'
-      })
-    }
+    wx.showToast({
+      title: '模块开发中',
+      icon: 'none'
+    })
   },
   /**
    * 生命周期函数--监听页面加载

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

@@ -11,7 +11,7 @@
 <view class="list">
   <block wx:for='{{userInfo.roleType==10001?listTeacher:listStudent}}' wx:key='{{index}}'>
     <navigator url="/pages/{{userInfo.roleType==10001?'teacher':'student'}}/{{item.url}}/{{item.url}}">
-      <view catchtap="{{userInfo.roleType==10002?'check':''}}" class="line">
+      <view catchtap="{{item.url?'':'check'}}" class="line">
         <view class="list-title">
           <image src='/images/{{item.nav}}.png'></image>
           <view>{{item.title}}</view>

+ 7 - 1
dorm-manager-wx/pages/teacher/pass/pass.js

@@ -87,9 +87,15 @@ Page({
     let year = date.getFullYear();
     let month = date.getMonth() + 1;
     let day = date.getDate();
+    let hour = date.getHours();
+    let minute = date.getMinutes();
+    let second = date.getSeconds();
     month = month < 10 ? "0" + month : month;
     day = day < 10 ? "0" + day : day;
-    date = year + '-' + month + '-' + day;
+    hour = hour < 10 ? "0" + hour : hour;
+    minute = minute < 10 ? "0" + minute : minute;
+    second = second < 10 ? "0" + second : second;
+    date = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
     console.log(date);
     return date;
   },

+ 8 - 2
dorm-manager-wx/pages/teacher/visitorcheck/visitorcheck.js

@@ -23,7 +23,7 @@ Page({
     if (that.data.isregiste) {
       that.getVisitorCheckInfo(2);
     } else {
-      that.getVisitorCheckInfo(3);
+      that.getVisitorCheckInfo(4);
     }
   },
 
@@ -58,9 +58,15 @@ Page({
     let year = date.getFullYear();
     let month = date.getMonth() + 1;
     let day = date.getDate();
+    let hour = date.getHours();
+    let minute = date.getMinutes();
+    let second = date.getSeconds();
     month = month < 10 ? "0" + month : month;
     day = day < 10 ? "0" + day : day;
-    date = year + '-' + month + '-' + day;
+    hour = hour < 10 ? "0" + hour : hour;
+    minute = minute < 10 ? "0" + minute : minute;
+    second = second < 10 ? "0" + second : second;
+    date = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':' + second;
     console.log(date);
     return date;
   },

+ 1 - 1
dorm-manager-wx/pages/teacher/visitorcheckdetail/visitorcheckdetail.wxml

@@ -9,7 +9,7 @@
       </view>
     </block>
   </view>
-  <view class="btn-item">
+  <view class="btn-item" wx:if='{{}}'>
     <view class="btn approve" hover-class="myhover" hover-start-time="50" hover-stay-time="50" bindtap="check" data-reject="approve">通过</view>
     <view class="btn reject" hover-class="myhover" hover-start-time="50" hover-stay-time="50" bindtap="check" data-reject="reject">驳回</view>
   </view>