kk.shi преди 3 години
родител
ревизия
4ff248098b

+ 6 - 2
pages/welfareMall/activityInfo/activityInfo.js

@@ -151,15 +151,19 @@ Page({
       } else {
         _self.setData({
           hideWindowValue:true,
-          preventDup:true
+          // preventDup:true
         })
       }
 
     } catch (err) {
+      // this.setData({
+      //   preventDup:true
+      // })
+      app.showToast(err.msg);
+    } finally{
       this.setData({
         preventDup:true
       })
-      app.showToast(err.msg);
     }
 
   },

+ 0 - 2
pages/welfareMall/order/orderCompletion.js

@@ -109,10 +109,8 @@ Page({
                   });
                   that.selectOrder(that.data.orderSn);
                 }
-                that.data.lock = false
             }).catch(_ => {
                 console.log(_)
-                that.data.lock = false
             })
         }
       },

+ 41 - 24
pages/welfareMall/staff/distinguish.js

@@ -82,33 +82,50 @@ Page({
     /**
      * 根据手机识别职员信息
      */
-      let resStaff = await WelfareMall.discernStoreStaff({
+      // let resStaff = await WelfareMall.discernStoreStaff({
+      //   mobile: getMobileCache(),
+      // });
+      await WelfareMall.discernStoreStaff({
         mobile: getMobileCache(),
-      });
-      if(resStaff.data.found){
-        let staffInfo = resStaff.data;
-        let shopowner = "no";
-        if(staffInfo.staffList != null && staffInfo.staffList.length >0){
-          for(var i=0;i<staffInfo.staffList.length;i++){
-            //判断员工是否是店长
-            if(1 == staffInfo.staffList[i].staff.isShopowner){
-              shopowner = "have";
-              break;
+      }).then(res => {
+          if (res.code == 200) {
+            let resStaff = res
+            if(resStaff.data.found){
+              let staffInfo = resStaff.data;
+              let shopowner = "no";
+              if(staffInfo.staffList != null && staffInfo.staffList.length >0){
+                for(var i=0;i<staffInfo.staffList.length;i++){
+                  //判断员工是否是店长
+                  if(1 == staffInfo.staffList[i].staff.isShopowner){
+                    shopowner = "have";
+                    break;
+                  }
+                }
+              }
+              setTimeout(function () {
+                wx.redirectTo({
+                  url:"../staff/isStaff?shopowner="+shopowner,
+                })
+              }, 2000) //延迟时间
+              
+            } else {
+              setTimeout(function () {
+                wx.redirectTo({
+                  url:"../staff/noStaff"
+                })
+              }, 2000) //延迟时间
             }
+          } else{
+            wx.switchTab({
+              url:"/pages/welfareMall/personal/personal",
+            })
           }
-        }
-        setTimeout(function () {
-          wx.redirectTo({
-            url:"../staff/isStaff?shopowner="+shopowner,
+      }).catch(_ => {
+          console.log(_)
+          wx.switchTab({
+            url:"/pages/welfareMall/personal/personal",
           })
-        }, 2000) //延迟时间
-        
-      } else {
-        setTimeout(function () {
-          wx.redirectTo({
-            url:"../staff/noStaff"
-          })
-        }, 2000) //延迟时间
-      }
+      })
+      
     },
 })

+ 1 - 1
pages/welfareMall/staff/distinguish.wxml

@@ -1,3 +1,3 @@
 <!--pages/welfareMall/staff/distinguish.wxml-->
-<topbar slot="head" title="" back-color-class="backColor" />
+<!-- <topbar slot="head" title="" back-color-class="backColor" /> -->
 <image class="distinguish" src="https://dy.shpr.top/welfareGo/distinguish.gif"  mode="aspectFit" />

+ 2 - 2
pages/welfareMall/staff/isStaff.wxss

@@ -30,8 +30,8 @@ page{
 }
 
 .head-noStaff-logo{
-  width: 162rpx;
-  height: 164rpx;
+  width: 152rpx;
+  height: 152rpx;
   border-radius: 50%;
   overflow :  hidden ;
   position: absolute;

+ 2 - 2
pages/welfareMall/staff/noStaff.wxss

@@ -30,8 +30,8 @@ page{
 }
 
 .head-noStaff-logo{
-  width: 162rpx;
-  height: 164rpx;
+  width: 152rpx;
+  height: 152rpx;
   border-radius: 50%;
   overflow :  hidden ;
   position: absolute;