Przeglądaj źródła

页面刷新处理

kk.shi 3 lat temu
rodzic
commit
e5c0478495

+ 2 - 1
pages/welfareMall/staff/distinguish.js

@@ -76,9 +76,10 @@ Page({
         mobile: getMobileCache(),
       });
       if(resStaff.data.found){
+        let staffString = JSON.stringify(resStaff)
         setTimeout(function () {
           wx.redirectTo({
-            url:"../staff/isStaff"
+            url:"../staff/isStaff?resStaff="+staffString,
           })
         }, 2000) //延迟时间
         

+ 4 - 8
pages/welfareMall/staffManage/staffManage.js

@@ -109,12 +109,8 @@ Page({
         }
         return
     }
-    // data.forEach(v => {
-    //     let payeTime = v.payedAt
-    //     v.payedAt = parseTime(payeTime, "{y}.{m}.{d} {h}:{i}:{s}")
-    // })
 
-    this.data.storeStaffList = this.data.storeStaffList.concat(...data)
+    this.data.storeStaffList = data
     this.setData({
         mobileTop:getMobileCache(),
         storeStaffList: this.data.storeStaffList
@@ -205,7 +201,7 @@ Page({
       icon: 'none',
       duration: 1500,
       success: function(){
-        that.onShow();
+        that.getStoreStaffList();
       }
     });
     
@@ -217,7 +213,7 @@ Page({
    */ 
   toDelete: function(e) {
    let staffId = e.currentTarget.dataset.id;
-   console.log(staffId);
+   let that = this
     wx.showModal({
       title: '删除员工',
       content: '',
@@ -241,7 +237,7 @@ Page({
                     icon: 'none',
                     duration: 1500,
                     success: function(){
-                      that.onShow();
+                      that.getStoreStaffList();
                     }
                   });
                 }