Quellcode durchsuchen

员工通道授权

kk.shi vor 3 Jahren
Ursprung
Commit
6e819dc09b

+ 15 - 0
pages/welfareMall/personal/personal.js

@@ -74,6 +74,21 @@ Page({
     })
   },
 
+  // 员工通道
+  getStaff(e) {
+    console.log(e)
+    getPhoneNumberSync(e, async () => {
+        let nums = await this.getCountNum();
+        console.log(nums)
+        this.setData({
+            isLogin: true,
+            mobileTop: getMobileCache(),
+            countNum: nums,
+        });
+        this.toStaff(e);  
+    })
+  },
+
   // 动态获取导航栏
   async getIndexList(){
     let res =  await WelfareMall.getPersonalData();

+ 3 - 1
pages/welfareMall/personal/personal.wxml

@@ -27,7 +27,9 @@
         </view>
       </view>
       <!-- 员工通道 -->
-      <view class="broadcast" catchtap="toStaff"></view>
+      <view><button class="wx-isLogin-broadcast" wx:if="{{!isLogin}}" open-type="getPhoneNumber" bindgetphonenumber="getStaff"></button>
+        <view class="broadcast" catchtap="toStaff"></view>
+      </view>
       <!-- 内容 -->
       <view class="content flex-column">
         <!-- 导航栏遍历 -->

+ 14 - 0
pages/welfareMall/personal/personal.wxss

@@ -170,6 +170,20 @@ page{
   border-style: none;
 }
 
+.wx-isLogin-broadcast{
+  position: absolute;
+  z-index: 2;
+  width: 678rpx !important;
+  height: 130rpx !important;
+  padding: 0 !important;
+  padding-left: 0 !important;
+  margin-left: 0rpx !important;
+  margin-right: 0rpx !important;
+  background-color: transparent;
+  border-style: none;
+  margin-top: 50rpx;
+}
+
 .content-lower{
   width: 668rpx;
   height: 2rpx;