From 1b897c74e44d185669d87abd4c3a29c90d6fe225 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期五, 19 七月 2024 20:10:27 +0800
Subject: [PATCH] Merge branch 'master' of http://139.186.142.91:10010/r/productDev/zbomyoujia

---
 wechat_staff/pages/store/staff.js |   36 +++++++++++++++++++++++++++++++++---
 1 files changed, 33 insertions(+), 3 deletions(-)

diff --git a/wechat_staff/pages/store/staff.js b/wechat_staff/pages/store/staff.js
index c951641..923677f 100644
--- a/wechat_staff/pages/store/staff.js
+++ b/wechat_staff/pages/store/staff.js
@@ -1,4 +1,6 @@
-// pages/store/staff.js
+// pages/store/staff.jsdownloadImg
+import { getUserCard } from '../../api/index'
+import { downloadImg } from '../../utils/common'
 Page({
 
   /**
@@ -6,7 +8,10 @@
    */
   data: {
     bottomLift: 0,
-    isShow: false
+    isShow: false,
+    userCard:'',
+    isShow2: false,
+    userInfo:{}
   },
 
   /**
@@ -14,12 +19,37 @@
    */
   onLoad(options) {
     var app = getApp().globalData
+    var userType = options.userType
+   
+    if(userType == 1){
+      //濡傛灉鏌ヨ鑷繁鐨勪俊鎭�
+      this.setData({userInfo: wx.getStorageSync('member')})
+      console.log(this.data)
+    } 
     this.setData({
       bottomLift: app.bottomLift
     })
   },
+  showQrcode(){
+    this.setData({isShow:true}) 
+  },
+  closeCard(){
+    this.setData({isShow2: false})
+  },
+
+  
+  saveCard(){
+   downloadImg(this.data.userCard);
+  },
   openModal() {
-    this.setData({isShow: true})
+    if(this.data.userCard !=null && this.data.userCard != ''){
+      this.setData({isShow2: true})
+      return;
+    }
+    getUserCard().then(res =>{
+      this.setData({userCard: res.data})
+      this.setData({isShow2: true})
+    }) 
   },
   onClose() {
     this.setData({isShow: false})

--
Gitblit v1.9.3