Browse Source

更新 客户登录逻辑判断

wzh 3 years ago
parent
commit
7ef5ddd38f
1 changed files with 22 additions and 8 deletions
  1. 22 8
      miniprogram/pages/sharePage/sharePage.js

+ 22 - 8
miniprogram/pages/sharePage/sharePage.js

@@ -283,10 +283,17 @@ Page({
       this.setData({
         isLogin: true
       })
-      this.getNewDetail()
-      this.getVoyageDetail()
-      this.getCarLoadRecordList()
-      this.getDischargeList()
+      if ((wx.getStorageSync('isClient') && wx.getStorageSync('sharePermission') || !(wx.getStorageSync('isClient')))) {
+        this.getNewDetail()
+        this.getVoyageDetail()
+        this.getCarLoadRecordList()
+        this.getDischargeList()
+      } else {
+        wx.showToast({
+          icon: "none",
+          title: '暂无查看权限'
+        })
+      }
     } else {
       wx.showToast({
         icon: "none",
@@ -309,10 +316,17 @@ Page({
       this.setData({
         isLogin: true
       })
-      this.getNewDetail()
-      this.getVoyageDetail()
-      this.getCarLoadRecordList()
-      this.getDischargeList()
+      if ((wx.getStorageSync('isClient') && wx.getStorageSync('sharePermission') || !(wx.getStorageSync('isClient')))) {
+        this.getNewDetail()
+        this.getVoyageDetail()
+        this.getCarLoadRecordList()
+        this.getDischargeList()
+      } else {
+        wx.showToast({
+          icon: "none",
+          title: '暂无查看权限'
+        })
+      }
     }
 
   },