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/login/index.wxss                                                  |    1 
 wechat_staff/package.json                                                            |    9 
 wechat_staff/pages/store/info.wxss                                                   |   14 +
 admin/.env.production                                                                |    2 
 wechat_staff/project.config.json                                                     |    2 
 wechat_staff/utils/request.js                                                        |    4 
 wechat_staff/pages/store/index.js                                                    |   38 +++
 wechat_staff/project.private.config.json                                             |    2 
 admin/src/views/business/customer.vue                                                |   16 +
 wechat_staff/pages/login/index.js                                                    |    5 
 wechat_staff/pages/store/staff.js                                                    |   36 +++
 wechat_staff/pages/sets/index.js                                                     |   17 +
 admin/.env.development                                                               |    2 
 wechat_staff/app.js                                                                  |   19 +
 wechat_staff/utils/config.js                                                         |    2 
 wechat_staff/pages/sets/protocol.wxml                                                |    2 
 wechat_staff/pages/work/index.js                                                     |   30 ++-
 wechat_staff/package-lock.json                                                       |   19 +
 wechat_staff/pages/sets/index.wxml                                                   |    6 
 wechat_staff/pages/store/staff.wxml                                                  |   41 ++-
 wechat_staff/pages/sets/protocol.js                                                  |   22 ++
 server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java |    2 
 wechat_staff/pages/store/info.js                                                     |   54 +++++
 wechat_staff/static/icon/mingpian_ic_dizhi@2x.png                                    |    0 
 wechat_staff/pages/work/index.wxml                                                   |   14 
 wechat_staff/pages/store/staff.wxss                                                  |   54 +++++
 wechat_staff/pages/store/info.wxml                                                   |   24 +-
 wechat_staff/api/index.js                                                            |   28 ++
 wechat_staff/pages/store/index.wxml                                                  |   10 
 wechat_staff/pages/work/index.wxss                                                   |    7 
 30 files changed, 369 insertions(+), 113 deletions(-)

diff --git a/admin/.env.development b/admin/.env.development
index aa3a833..4cc5086 100644
--- a/admin/.env.development
+++ b/admin/.env.development
@@ -1,3 +1,3 @@
 # 寮�鍙戠幆澧冮厤缃�
 NODE_ENV = 'development'
-VUE_APP_BASE_API = 'http://localhost:10028'
+VUE_APP_BASE_API = 'http://192.168.0.135:10028'
diff --git a/admin/.env.production b/admin/.env.production
index dc6dc7f..4b4216d 100644
--- a/admin/.env.production
+++ b/admin/.env.production
@@ -1,2 +1,4 @@
 # 鐢熶骇鐜閰嶇疆
 NODE_ENV = 'production'
+
+VUE_APP_BASE_API = 'https://dmtest.ahapp.net/admin_interface'
diff --git a/admin/src/views/business/customer.vue b/admin/src/views/business/customer.vue
index f80b7bc..92bb989 100644
--- a/admin/src/views/business/customer.vue
+++ b/admin/src/views/business/customer.vue
@@ -40,18 +40,20 @@
         @selection-change="handleSelectionChange"
       >
         <el-table-column type="selection" width="55"></el-table-column>
-        <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" min-width="120px"></el-table-column>
-        <el-table-column prop="name" label="濮撳悕" min-width="100px"></el-table-column>
-        <el-table-column prop="phone" label="鐢佃瘽" min-width="100px"></el-table-column>
+        <el-table-column prop="createDate" label="鍒涘缓鏃堕棿" fixed min-width="140px"></el-table-column>
+        <el-table-column prop="name" label="濮撳悕" fixed min-width="100px"></el-table-column>
+        <el-table-column prop="phone" label="鐢佃瘽" fixed min-width="100px"></el-table-column>
+        <el-table-column prop="proName" label="鐪佷唤" min-width="180px">
+          <template slot-scope="{row}">
+            {{row.proName||''}}{{row.cityName||''}}{{row.areaName||''}}
+          </template>
+        </el-table-column>
         <el-table-column prop="addr" label="鍦板潃" min-width="100px"></el-table-column>
         <el-table-column prop="ip" label="IP鍦板潃" min-width="100px"></el-table-column>
-        <el-table-column prop="proName" label="鐪佷唤" min-width="100px"></el-table-column>
-        <el-table-column prop="cityName" label="鍩庡競" min-width="100px"></el-table-column>
-        <el-table-column prop="areaName" label="鍖哄煙" min-width="100px"></el-table-column>
         <el-table-column prop="sysVersion" label="绯荤粺鐗堟湰" min-width="100px"></el-table-column>
         <el-table-column prop="browser" label="娴忚鍣�" min-width="100px"></el-table-column>
         <el-table-column prop="terminal" label="缁堢绫诲瀷" min-width="100px"></el-table-column>
-        <el-table-column prop="openid" label="寰俊openid" min-width="100px"></el-table-column>
+        <el-table-column prop="openid" label="寰俊openid" min-width="240px"></el-table-column>
         <el-table-column prop="info" label="澶囨敞" min-width="100px"></el-table-column>
 <!--        <el-table-column
           v-if="containPermissions(['business:customer:update', 'business:customer:delete'])"
diff --git a/server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
index 37739e1..3c3b69d 100644
--- a/server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
+++ b/server/service/src/main/java/com/doumee/service/business/impl/MemberServiceImpl.java
@@ -445,8 +445,6 @@
         return ztUserGetTokenResponse;
     }
 
-
-
     @Override
     public Member getMemberInfo(Long memberId){
         Member member = memberMapper.selectById(memberId);
diff --git a/wechat_staff/api/index.js b/wechat_staff/api/index.js
index 2c30b26..0a9f095 100644
--- a/wechat_staff/api/index.js
+++ b/wechat_staff/api/index.js
@@ -42,7 +42,7 @@
 // 鑾峰彇瀛楀吀鍊�
 export const getDictData = (data) => {
   return request({
-    url: '/public/getDictData',
+    url: '/public/getDictData?code='+data.code+'&label='+data.label,
     data,
     loading: '0'
   })
@@ -91,6 +91,21 @@
     data
   })
 }
+
+export const getUserCard = (data) => {
+  return request({
+    url: '/web/personnel/getUserCard',
+    method: "POST",
+    data
+  })
+}
+export const logout = (data) => {
+  return request({
+    url: '/web/personnel/logOff',
+    method: "POST",
+    data
+  })
+}
 // 蹇楄瑁呬慨 鍐呭
 export const pageZSZXContentList = (data) => {
   return request({
@@ -107,10 +122,17 @@
     data
   })
 }
+export const updateShop = (data) => {
+  return request({
+    url: '/web/personnel/updShop',
+    method: 'POST',
+    data
+  })
+}
 // 鑾峰彇闂ㄥ簵璇︽儏
 export const getShopDetail = (data) => {
   return request({
-    url: '/web/customer/shopDetail',
+    url: '/web/personnel/shopDetail?shopId='+data,
     data
   })
 }
@@ -159,4 +181,4 @@
     url: '/web/customer/logOff',
     data
   })
-}
\ No newline at end of file
+}
diff --git a/wechat_staff/app.js b/wechat_staff/app.js
index 238768a..ca43848 100644
--- a/wechat_staff/app.js
+++ b/wechat_staff/app.js
@@ -9,12 +9,11 @@
     const WindowInfo = wx.getWindowInfo()
     if (WindowInfo.safeArea.top > 20) {
       this.globalData.bottomLift = WindowInfo.screenHeight - WindowInfo.safeArea.bottom;
-    }
-    // 
-    return
-    const res = wx.getStorageSync('member')
+    } 
+    const res = wx.getStorageSync('member')  
     if (res) {
       this.globalData.userInfo = res
+      console.error("res",res)
     } else {
       // 鐧诲綍
       wx.login({
@@ -26,16 +25,22 @@
               code: res.code
             }).then(res => {
               console.log(res)
-              if (res && res.data.member) {
-                wx.setStorageSync('member', res.data.member)
-                wx.setStorageSync('openid', res.data.member.openid)
+              if (res && res.data.users) {
+                wx.setStorageSync('member', res.data.users)
+                wx.setStorageSync('openid', res.data.users.openid)
                 wx.setStorageSync('sessionKey', res.data.sessionKey)
                 wx.setStorageSync('token', res.data.token)
               } else {
+                wx.navigateTo({
+                  url: '/pages/login/index',
+                })
                 console.log('鐧诲綍澶辫触锛�')
               }
             })
           } else {
+            wx.navigateTo({
+              url: '/pages/login/index',
+            })
             console.log('鐧诲綍澶辫触锛�' + res)
           }
         },
diff --git a/wechat_staff/package-lock.json b/wechat_staff/package-lock.json
index a7827a3..93912f0 100644
--- a/wechat_staff/package-lock.json
+++ b/wechat_staff/package-lock.json
@@ -1,11 +1,26 @@
 {
-  "requires": true,
+  "name": "wechat_staff",
+  "version": "1.0.0",
   "lockfileVersion": 1,
+  "requires": true,
   "dependencies": {
     "@vant/weapp": {
       "version": "1.11.6",
-      "resolved": "https://registry.npmjs.org/@vant/weapp/-/weapp-1.11.6.tgz",
+      "resolved": "https://registry.npmmirror.com/@vant/weapp/-/weapp-1.11.6.tgz",
       "integrity": "sha512-a3heReWYT2gNdsyj6x1hBwsM8V8NrjcPAmle86NH2CD2V/i/h0le75piW6KntSfOPCwekVWMBKhysNrBpJeKdw=="
+    },
+    "jsbn": {
+      "version": "1.1.0",
+      "resolved": "https://registry.npmmirror.com/jsbn/-/jsbn-1.1.0.tgz",
+      "integrity": "sha512-4bYVV3aAMtDTTu4+xsDYa6sy9GyJ69/amsu9sYF2zqjiEoZA5xJi3BrfX3uY+/IekIu7MwdObdbDWpoZdBv3/A=="
+    },
+    "miniprogram-sm-crypto": {
+      "version": "0.3.13",
+      "resolved": "https://registry.npmmirror.com/miniprogram-sm-crypto/-/miniprogram-sm-crypto-0.3.13.tgz",
+      "integrity": "sha512-H7qwbCEmIXZzekCSgEWeHh1mb4cnz0E42YH3U5xqpOaJBB2Sj9ySq0hTGv0f+Jwo5SknABR6fw+EtjnMyJ/O/Q==",
+      "requires": {
+        "jsbn": "^1.1.0"
+      }
     }
   }
 }
diff --git a/wechat_staff/package.json b/wechat_staff/package.json
index c1095b8..92336ca 100644
--- a/wechat_staff/package.json
+++ b/wechat_staff/package.json
@@ -1,14 +1,17 @@
 {
   "name": "wechat_staff",
   "version": "1.0.0",
-  "description": "",
   "main": ".eslintrc.js",
-  "dependencies": {},
+  "dependencies": {
+    "@vant/weapp": "^1.11.6",
+    "miniprogram-sm-crypto": "^0.3.13"
+  },
   "devDependencies": {},
   "scripts": {
     "test": "echo \"Error: no test specified\" && exit 1"
   },
   "keywords": [],
   "author": "",
-  "license": "ISC"
+  "license": "ISC",
+  "description": ""
 }
diff --git a/wechat_staff/pages/login/index.js b/wechat_staff/pages/login/index.js
index 15689ba..1371551 100644
--- a/wechat_staff/pages/login/index.js
+++ b/wechat_staff/pages/login/index.js
@@ -9,9 +9,8 @@
     primary: '',
     status: '0', // 鏍囪瘑
     countDown: 0,
-    phone: '13663966099',
-    code: '',
-
+    phone: '',
+    code: '', 
     showModal: false,
     activeHtml: '',
   },
diff --git a/wechat_staff/pages/login/index.wxss b/wechat_staff/pages/login/index.wxss
index 54467bd..3aa86a0 100644
--- a/wechat_staff/pages/login/index.wxss
+++ b/wechat_staff/pages/login/index.wxss
@@ -4,6 +4,7 @@
   border-radius: 50%;
   margin: 130rpx auto 30rpx;
 }
+
 .home_title {
   font-weight: 500;
   font-size: 40rpx;
diff --git a/wechat_staff/pages/sets/index.js b/wechat_staff/pages/sets/index.js
index 8a59b32..d232609 100644
--- a/wechat_staff/pages/sets/index.js
+++ b/wechat_staff/pages/sets/index.js
@@ -1,4 +1,6 @@
 // pages/sets/index.js
+
+import { logout } from '../../api/index'
 Page({
 
   /**
@@ -20,12 +22,21 @@
   onClose() {
     this.setData({show: false})
   },
-  changeDeal(){
+  changeDeal(e){
     wx.navigateTo({
-      url: '/pages/sets/protocol',
+      url: '/pages/sets/protocol?type='+e.currentTarget.dataset.index,
     })
   },
-
+  logout(){
+    logout({
+    }).then(res => {
+      wx.setStorageSync('member', null)
+      wx.setStorageSync('token', '')
+      wx.navigateTo({
+        url: '/pages/login/index',
+      })
+    }) 
+  },
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
    */
diff --git a/wechat_staff/pages/sets/index.wxml b/wechat_staff/pages/sets/index.wxml
index fd20e0c..2765015 100644
--- a/wechat_staff/pages/sets/index.wxml
+++ b/wechat_staff/pages/sets/index.wxml
@@ -1,10 +1,10 @@
 <view class="container">
   <view class="list">
-    <view class="line" bindtap="changeDeal">
+    <view class="line" data-index="0" bindtap="changeDeal">
       <view class="name">銆奪BOM鐢ㄦ埛鏈嶅姟鍗忚銆�</view>
       <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image>
     </view>
-    <view class="line" bindtap="changeDeal">
+    <view class="line" data-index="1" bindtap="changeDeal">
       <view class="name">銆奪BOM鐢ㄦ埛闅愮鍗忚銆�</view>
       <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image>
     </view>
@@ -19,7 +19,7 @@
         <view class="title">娉ㄩ攢鎻愰啋</view>
         <view class="text">濡傛偍涓嶅啀浣跨敤姝よ处鍙凤紝鍙互灏嗗叾娉ㄩ攢銆傝处鍙锋垚鍔熸敞閿�鍚庯紝鍏朵笅鎵�鏈夋暟鎹皢浼氳鍒犻櫎骞跺皢鏃犳硶鎭㈠锛岃璋ㄦ厧鎿嶄綔</view>
         <view class="btns">
-          <view class="btn">纭娉ㄩ攢</view>
+          <view class="btn" bind:tap="logout">纭娉ㄩ攢</view>
           <view class="btn cancel" bindtap="onClose">杩樻槸绠椾簡</view>
         </view>
     </view>
diff --git a/wechat_staff/pages/sets/protocol.js b/wechat_staff/pages/sets/protocol.js
index b731e2f..0c310a4 100644
--- a/wechat_staff/pages/sets/protocol.js
+++ b/wechat_staff/pages/sets/protocol.js
@@ -1,20 +1,36 @@
 // pages/sets/protocol.js
+import { getDictData } from '../../api/index'
 Page({
 
   /**
    * 椤甸潰鐨勫垵濮嬫暟鎹�
    */
   data: {
-
+    content:''
   },
 
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
   onLoad(options) {
-
+    console.log(options.type)
+    if(options.type == 1){
+      wx.setNavigationBarTitle({title:'闅愮鍗忚'}) 
+    }else{
+      wx.setNavigationBarTitle({title:'鐢ㄦ埛鍗忚'})  
+    }
+    this.loadDict(options.type); 
   },
-
+  loadDict(type){
+    //type ==0 鐢ㄦ埛鍗忚锛屽惁鍒欓殣绉佸崗璁�
+    const label = type == 1?'PRIVACY_AGREEMENT':'SERVER_AGREEMENT'
+    getDictData({
+      code: 'ZBOM_CUSTOMIZED',
+      label: label
+    }).then(res => {
+      this.setData({ content: res.data.code })
+    })
+  },
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
    */
diff --git a/wechat_staff/pages/sets/protocol.wxml b/wechat_staff/pages/sets/protocol.wxml
index dc09cdd..6cb36d0 100644
--- a/wechat_staff/pages/sets/protocol.wxml
+++ b/wechat_staff/pages/sets/protocol.wxml
@@ -1,2 +1,2 @@
 <!--pages/sets/protocol.wxml-->
-<text>pages/sets/protocol.wxml</text>
+<rich-text  nodes="{{content}}"> </rich-text>
diff --git a/wechat_staff/pages/store/index.js b/wechat_staff/pages/store/index.js
index 18133d5..28f0871 100644
--- a/wechat_staff/pages/store/index.js
+++ b/wechat_staff/pages/store/index.js
@@ -1,3 +1,4 @@
+import { getShopDetail } from '../../api/index'
 // pages/store/index.js
 Page({
 
@@ -5,18 +6,43 @@
    * 椤甸潰鐨勫垵濮嬫暟鎹�
    */
   data: {
-
+      shopId: null,
+      shopInfo:{}
   },
 
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
-  onLoad(options) {
-
+  onLoad(options) { 
+    console.log(options.shopId)
+    this.setData({shopId:options.shopId})
+  },
+  getShopInfo(id){ 
+    
+    getShopDetail(id).then(res => {
+      if(res.data && res.data.seqNameList){
+        const t = '';
+        const tindex =0;
+        res.data.seqNameList.array.forEach(element => {
+          if(tindex>0){
+            t =t+"銆�"
+          }           
+           t = t+ element;
+           tindex++;
+        });
+        res.data.seqNameInfo = t;
+      }
+      this.setData({
+        shopInfo: res.data
+      })  
+    }) 
   },
   handleEdit(e) {
+    const {shopInfo} = this.data
+    const objString = JSON.stringify(shopInfo);
+    console.log(objString) 
     wx.navigateTo({
-      url: '/pages/store/info',
+      url: '/pages/store/info?data='+objString ,
     })
   },
   /**
@@ -29,8 +55,8 @@
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鏄剧ず
    */
-  onShow() {
-
+  onShow() { 
+    this.getShopInfo(this.data.shopId)
   },
 
   /**
diff --git a/wechat_staff/pages/store/index.wxml b/wechat_staff/pages/store/index.wxml
index 64f2ac1..d4406ce 100644
--- a/wechat_staff/pages/store/index.wxml
+++ b/wechat_staff/pages/store/index.wxml
@@ -1,22 +1,22 @@
 <view class="container">
   <view class="list">
     <view class="item">
-      <view class="name">鍚堣偉绾㈡槦鏂板搧棣�</view>
+      <view class="name">{{shopInfo.name}}</view>
       <view class="line">
         <view class="label">鑱旂郴浜�</view>
-        <view class="val">寮犵殑蹇�</view>
+        <view class="val">{{shopInfo.linkerName}}</view>
       </view>
       <view class="line">
         <view class="label">鑱旂郴鐢佃瘽</view>
-        <view class="val">188</view>
+        <view class="val">{{shopInfo.linkPhone}}</view>
       </view>
       <view class="line">
         <view class="label">缁忚惀鑼冨洿</view>
-        <view class="val">鍏ㄥ眿瀹氬埗銆佹暣浣撳帹鎴裤�佹湪闂ㄥ鏉裤�佸崼闃冲畾鍒�</view>
+        <view class="val">{{shopInfo.seqNameInfo||''}}</view>
       </view>
       <view class="line">
         <view class="label">闂ㄥ簵鍦板潃</view>
-        <view class="val">瀹夊窘鐪佸悎鑲ュ競閲戝璺惀鐝�浜旂幆鍥介檯A搴�</view>
+        <view class="val">{{shopInfo.address}}</view>
       </view>
       <view bindtap="handleEdit" class="edit">缂栬緫</view>
     </view>
diff --git a/wechat_staff/pages/store/info.js b/wechat_staff/pages/store/info.js
index 1d6af09..af51976 100644
--- a/wechat_staff/pages/store/info.js
+++ b/wechat_staff/pages/store/info.js
@@ -1,3 +1,5 @@
+import { updateShop,getMemberInfo } from "../../api/index";
+
 // pages/store/info.js
 Page({
 
@@ -5,23 +7,67 @@
    * 椤甸潰鐨勫垵濮嬫暟鎹�
    */
   data: {
-    name: ''
+    linkerName:'',
+    linkPhone:'',
+    address:'',
+    latitude:'',
+    longitude:'',
+    shopInfo:{}
   },
 
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
   onLoad(options) {
-
+    const obj =JSON.parse(options.data);
+    this.setData({shopInfo: obj ,
+      linkPhone:obj.linkPhone,
+      linkerName:obj.linkerName,
+      address:obj.address,
+      latitude:obj.latitude,
+      longitude:obj.longitude }) 
   },
-  getLocation() {
-    console.log('鎯﹁浜�');
+  getLocation() { 
+    const that = this;
     wx.chooseLocation({
       success: (result) => {
         console.log('result', result);
+        const {shopInfo,latitude,longitude,address} = that.data;
+        shopInfo.latitude = result.latitude
+        shopInfo.longitude = result.longitude  
+        shopInfo.address = result.address ||shopInfo.address
+        that.setData({shopInfo: shopInfo ,
+          address:shopInfo.address,
+          latitude:shopInfo.latitude,
+          longitude:shopInfo.longitude })
       },
     })
   },
+  saveInfo(){
+    const {shopInfo} =this.data;
+    console.log(shopInfo)
+    shopInfo.address = this.data.address
+    shopInfo.linkerName = this.data.linkerName
+    shopInfo.linkPhone = this.data.linkPhone
+    shopInfo.latitude = this.data.latitude
+    shopInfo.longitude = this.data.longitude
+    updateShop(shopInfo).then(res => { 
+      wx.showToast({
+        title: '闂ㄥ簵淇℃伅淇敼鎴愬姛',
+        icon: 'none'
+      })
+      getMemberInfo().then(res => {
+        this.setData({
+          userInfo: res.data
+        }) 
+        wx.setStorageSync('member',res.data)
+        wx.navigateBack({
+          delta: 1  
+        });
+      }) 
+     
+    }) 
+  },
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍒濇娓叉煋瀹屾垚
    */
diff --git a/wechat_staff/pages/store/info.wxml b/wechat_staff/pages/store/info.wxml
index 8af0293..ae2a0df 100644
--- a/wechat_staff/pages/store/info.wxml
+++ b/wechat_staff/pages/store/info.wxml
@@ -3,34 +3,30 @@
     <view class="line">
       <view class="la">闂ㄥ簵鑱旂郴浜�</view>
       <view class="val">
-        <view class="input">鐜嬪痉鍙�</view>
-        <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image>
+       <van-field class="input" model:value="{{ linkerName }}" clearable border="{{ false }}" /> 
       </view>
     </view>
     <view class="line">
       <view class="la">闂ㄥ簵鐢佃瘽</view>
       <view class="val">
-        <van-field class="input" model:value="{{ name }}" clearable border="{{ false }}" />
+        <van-field class="input" model:value="{{ linkPhone }}" clearable border="{{ false }}" />
       </view>
     </view>
     <view class="line">
       <view class="la">闂ㄥ簵缁忕含搴�</view>
-      <view class="val">
-        <view class="input">116.40,40.28</view>
+      <view class="val"  bindtap="getLocation">
+        <view class="input">{{ longitude }},{{ latitude }}</view>
         <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image>
       </view>
     </view>
     <view class="line">
       <view class="la">闂ㄥ簵鍦板潃</view>
-      <view class="val" bindtap="getLocation">
-        <view class="input">瀹夊窘鐪佸悎鑲ュ競閲戝璺惀鐝�浜旂幆鍥解�﹀畨寰界渷鍚堣偉甯傞噾瀵ㄨ矾鐞ョ弨浜旂幆鍥解��</view>
-        <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image>
+      <view class="val"> 
+        <van-field class="input" model:value="{{address}}" clearable border="{{ false }}" />  
       </view>
-    </view>
-    <view class="line">
-      <view class="la">缁忚惀鑼冨洿</view>
-      <view class="val">鍏ㄥ眿瀹氬埗銆佹暣浣撳帹鎴裤�佹湪闂ㄥ鏉�</view>
-    </view>
-
+    </view>  
+  </view>
+  <view class="bottombtn">
+      <button bind:tap="saveInfo" class="savebutton">淇濆瓨</button>
   </view>
 </view>
\ No newline at end of file
diff --git a/wechat_staff/pages/store/info.wxss b/wechat_staff/pages/store/info.wxss
index 7d4792c..090fd2b 100644
--- a/wechat_staff/pages/store/info.wxss
+++ b/wechat_staff/pages/store/info.wxss
@@ -31,3 +31,17 @@
 .list .line .val .icon {
   width: 40rpx;
 }
+.bottombtn{
+  position: fixed;
+  bottom: 0px;
+  width: 100%;
+  padding: 20px;
+}
+.savebutton{
+  bottom: 20px;
+  width: 100%; 
+  border: none;
+  color: white;
+  background: #B08771;
+  border-radius: 8px;
+}
\ No newline at end of file
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})
diff --git a/wechat_staff/pages/store/staff.wxml b/wechat_staff/pages/store/staff.wxml
index ffb043f..33b4a62 100644
--- a/wechat_staff/pages/store/staff.wxml
+++ b/wechat_staff/pages/store/staff.wxml
@@ -2,28 +2,28 @@
   <back />
   <image src="../../static/images/design_banner@2x.png" mode="widthFix" class="bg_wrap"></image>
   <view class="container">
-    <image class="avatar" src=""></image>
+    <image class="avatar" src="{{userInfo.imgurlFull}}"></image>
     <view class="name_wrap">
       <view class="left">
-        <view class="name">濮撳悕</view>
+        <view class="name">{{userInfo.name}}</view>
         <view class="tag">瀵艰喘</view>
         <!-- <view class="tag">5骞寸粡楠�</view> -->
       </view>
-      <image class="qrcode" src="../../static/icon/mingpian_erweima@2x.png" mode="widthFix"></image>
+      <image bind:tap="showQrcode" class="qrcode" src="../../static/icon/mingpian_erweima@2x.png" mode="widthFix"></image>
     </view>
     <view class="desc">
       <image src="../../static/icon/mingpian_ic_edit@2x.png" mode="widthFix"></image>
-      <view>鐢ㄥ績鏈嶅姟姣忎竴浣嶉【瀹�</view>
+      <view>{{userInfo.slogans}}</view>
       <view class="icon"></view>
     </view>
     <view class="static">
       <view class="card">
         <view>浠庝笟骞撮檺</view>
-        <view class="num">5</view>
+        <view class="num">{{userInfo.jobDate||'0'}}</view>
       </view>
       <view class="card">
         <view>鏈嶅姟瀹㈡埛</view>
-        <view class="num">500+</view>
+        <view class="num">{{userInfo.costomerNum||'0'}}</view>
       </view>
     </view>
     <view class="guide">
@@ -31,39 +31,48 @@
       <view class="line">
         <image class="icon" src="../../static/icon/mingpian_ic_phone@2x.png" mode="widthFix"></image>
         <text class="label">鑱旂郴鐢佃瘽</text>
-        <text class="val">1888888888888</text>
+        <text class="val">{{userInfo.phone}}</text>
       </view>
       <view class="line">
         <image class="icon" src="../../static/icon/mingpian_ic_mendian@2x.png" mode="widthFix"></image>
         <text class="label">闂ㄥ簵鍚嶇О</text>
-        <text class="val">1888888888888</text>
+        <text class="val">{{userInfo.shopName}}</text>
       </view>
       <view class="line">
-        <image class="icon" src="../../static/icon/mingpian_ic_dizhi@2x.png" mode="widthFix"></image>
+        <image class="icon" src="../../static/icon/mingpian_ic_dizhi@2x.png" mode="widthFix" style="width: 45rpx;"  ></image>
         <text class="label">闂ㄥ簵鍦板潃</text>
-        <text class="val">1888888888888</text>
+        <text class="val">{{userInfo.shopAddress}}</text>
       </view>
     </view>
   </view>
   <!-- footer -->
   <view class="footer" style="bottom: {{bottomLift}}px;">
-    <view class="btn">
+    <view class="btn"  bindtap="openModal">
       <image src="../../static/icon/share.png" mode="widthFix"></image>
-      <view bindtap="openModal">鍒嗕韩</view>
+      <view>鍒嗕韩</view>
     </view>
   </view>
   <!-- 璇︽儏 -->
   <van-popup show="{{ isShow }}"  closeable round bind:close="onClose">
     <view class="modal">
       <view class="header">
-        <image class="avatar" src=""></image>
+        <image class="avatar" src="{{userInfo.imgurlFull}}"></image>
         <view class="content">
-            <view class="name">濮撳悕</view>
-            <view class="desc">瀵艰喘 锝� 5骞寸粡楠�</view>
+            <view class="name">{{userInfo.name}}</view>
+            <view class="desc">瀵艰喘 锝� {{userInfo.jobDate ||'0'}}骞寸粡楠�</view>
         </view>
       </view>
-      <image class="qrcode" src=""></image>
+      <image class="qrcode" src="{{userInfo.qrcodeImgFull}}"></image>
       <view class="text">闀挎寜鍥剧墖璇嗗埆浜岀淮鐮�</view>
     </view>
+  </van-popup> <!-- 鐢ㄦ埛鍚嶇墖 -->
+  <van-popup class="modalcard" show="{{ isShow2 }}" round    custom-style="background-color: rgba(0,0,0,0);">
+    <view class="img1">
+      <image class="qrcodecard" src="{{userCard}}"></image> 
+    </view>  
+    <view class="btns">
+      <button class="btn1" bind:tap="closeCard">鍙栨秷</button> 
+      <button class="btn2" bind:tap="saveCard">淇濇寔鍒扮浉鍐�</button>
+    </view>
   </van-popup>
 </view>
\ No newline at end of file
diff --git a/wechat_staff/pages/store/staff.wxss b/wechat_staff/pages/store/staff.wxss
index 8633274..550aac7 100644
--- a/wechat_staff/pages/store/staff.wxss
+++ b/wechat_staff/pages/store/staff.wxss
@@ -99,12 +99,12 @@
   margin-bottom: 42rpx;
 }
 .guide .line .icon {
-  width: 30rpx;
+  width: 30rpx;  
 }
 .guide .line .label {
   color: #777777;
-  margin-left: 24rpx;
-  margin-right: 44rpx;
+  min-width: 140rpx;
+  margin-left: 24rpx; 
 }
 .footer {
   display: flex;
@@ -165,3 +165,51 @@
   color: #999999;
   text-align: center;
 }
+.modalcard{
+  display: inline-block;
+  width: 600rpx;
+  height: 1100rpx;   
+  box-sizing: border-box;   
+}
+.modalcard .img1{ 
+  width: 100%;
+  height: 956rpx;     
+  box-sizing: border-box;  
+}
+.modalcard .qrcodecard{
+  width: 600rpx;
+  height: 956rpx;   
+  border-radius: 26rpx ;
+}
+.modalcard .btns{
+  width: 100%; 
+  display: flex;
+  margin-top:30rpx ;
+  margin-bottom: 10rpx;
+} 
+.modalcard .btns .btn1{
+  width: 290rpx; 
+  border-radius: 8rpx !important;
+  height:88rpx ; 
+  font-size: 32rpx;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  color: white; 
+  border: 2rpx solid #FFFFFF;
+  background:rgba(0,0,0,0)
+} 
+.modalcard .btns .btn2{
+  width: 290rpx; 
+  height:88rpx ; 
+  font-size: 32rpx;  
+  color: white;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  border-radius: 8rpx !important;
+  background: linear-gradient( 180deg, #E0B49C 0%, #B68B74 100%);
+  border-radius: 8px;
+  border: none;
+} 
+
diff --git a/wechat_staff/pages/work/index.js b/wechat_staff/pages/work/index.js
index 1f5c4c0..cb7b991 100644
--- a/wechat_staff/pages/work/index.js
+++ b/wechat_staff/pages/work/index.js
@@ -1,16 +1,17 @@
-import { getMemberInfo } from '../../api/index'
+import { getDictData, getMemberInfo } from '../../api/index'
 Page({
 
   /**
    * 椤甸潰鐨勫垵濮嬫暟鎹�
    */
   data: {
+    topimg:'',
     clientHeight: 0,
-    clientTop: 0,
-
-    uesrInfo: {}
+    clientTop: 0, 
+    userInfo: {name:''}
   },
 
+ 
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
@@ -18,16 +19,17 @@
     const res = wx.getMenuButtonBoundingClientRect()
     this.setData({clientHeight: res.height})
     this.setData({clientTop: res.top})
-
+ 
     this.initData()
   },
   changePath(e) {
+    const {userInfo} = this.data
     // 椤甸潰璺宠浆
     let temp = [
       '/pages/userinfo/index',
-      '/pages/store/staff',
+      '/pages/store/staff?userType=1',
       '/pages/userinfo/collect',
-      '/pages/store/index',
+      '/pages/store/index?shopId='+userInfo.departmentId,
       '/pages/sets/index'
     ]
     const index = e.currentTarget.dataset.index
@@ -38,12 +40,18 @@
   initData() {
     getMemberInfo().then(res => {
       this.setData({
-        uesrInfo: res.data
-      })
+        userInfo: res.data
+      }) 
+      wx.setStorageSync('member',res.data)
+    }) 
+    getDictData({
+      code: 'WEIXIN_DEFAULT_IMGS',
+      label: 'STAFF_WORK_TOP_IMG'
+    }).then(res => {
+      this.setData({ topimg: res.data.code })
     })
   },
-  onReady() {
-
+  onReady() { 
   },
 
   /**
diff --git a/wechat_staff/pages/work/index.wxml b/wechat_staff/pages/work/index.wxml
index e0bd9a4..7ddc805 100644
--- a/wechat_staff/pages/work/index.wxml
+++ b/wechat_staff/pages/work/index.wxml
@@ -1,16 +1,18 @@
 <view class="container">
+<view class="topbg" style="background-image:url('{{topimg}}');background-color: aquamarine;">
   <view class="navbar" style="padding-top: {{ clientTop }}px;height: {{clientHeight + clientTop}}px;">宸ヤ綔鍙�</view>
-  <view class="userinfo">
-    <image class="avatar" src=""></image>
-    <view class="content">
+  <view class="userinfo" data-index="0" bindtap="changePath">
+    <image class="avatar" src="{{userInfo.imgurlFull}}"></image>
+    <view class="content" >
       <view class="header">
-        <view class="name">鑻忕伩</view>
+        <view class="name">{{userInfo.name}}</view>
       </view>
-      <view class="addr">鍚堣偉鑾茶姳灏忓尯</view>
-      <view class="detail">120m虏 锝�3瀹�1鍘�1鍘�1鍗�</view>
+      <view class="addr">{{userInfo.phone}}</view>
+      <view class="detail">{{userInfo.shopName}}</view>
     </view>
     <image data-index="0" bindtap="changePath" class="edit" src="../../static/icon/gongzuotai_ic_erweima@2x.png" mode="widthFix"></image>
   </view>
+</view> 
   <view class="main_content">
     <view class="func_list">
       <view class="line" data-index="1" bindtap="changePath">
diff --git a/wechat_staff/pages/work/index.wxss b/wechat_staff/pages/work/index.wxss
index c177fde..b5124e6 100644
--- a/wechat_staff/pages/work/index.wxss
+++ b/wechat_staff/pages/work/index.wxss
@@ -11,8 +11,11 @@
   display: flex;
   padding: 72rpx 40rpx 48rpx;
   color: #fff;
-  font-size: 26rpx;
-  background-color: aquamarine;
+  font-size: 26rpx; 
+}
+.container .topbg{
+  background-size: 100% auto;
+  background-repeat: no-repeat;
 }
 .container .userinfo .content {
   flex: 1;
diff --git a/wechat_staff/project.config.json b/wechat_staff/project.config.json
index 6f2d575..0a28905 100644
--- a/wechat_staff/project.config.json
+++ b/wechat_staff/project.config.json
@@ -1,5 +1,5 @@
 {
-  "appid": "wx208dd1edc0be24ee",
+  "appid": "wx9910433b937fff92",
   "compileType": "miniprogram",
   "libVersion": "3.4.10",
   "packOptions": {
diff --git a/wechat_staff/project.private.config.json b/wechat_staff/project.private.config.json
index 7ebdbf6..246436e 100644
--- a/wechat_staff/project.private.config.json
+++ b/wechat_staff/project.private.config.json
@@ -39,5 +39,5 @@
       ]
     }
   },
-  "libVersion": "2.25.4"
+  "libVersion": "3.4.10"
 }
\ No newline at end of file
diff --git a/wechat_staff/static/icon/mingpian_ic_dizhi@2x.png b/wechat_staff/static/icon/mingpian_ic_dizhi@2x.png
index 9bb0821..4461553 100644
--- a/wechat_staff/static/icon/mingpian_ic_dizhi@2x.png
+++ b/wechat_staff/static/icon/mingpian_ic_dizhi@2x.png
Binary files differ
diff --git a/wechat_staff/utils/config.js b/wechat_staff/utils/config.js
index 09164ce..a6b251c 100644
--- a/wechat_staff/utils/config.js
+++ b/wechat_staff/utils/config.js
@@ -1,7 +1,7 @@
 
 
 // export const baseUrl = 'https://jiaxuan.zbom.com/jx/wechat/' //姝e紡鏈嶅姟鍣�
-export const baseUrl = 'http://192.168.0.135:10027' // 鏈湴
+export const baseUrl = 'https://dmtest.ahapp.net/web_interface/' // 鏈湴
 // export const baseUrl = 'http://zbtest.ahapp.net/zbom_interface/jx/wechat/' //娴嬭瘯鏈嶅姟鍣�
 
 // export const imageUrl = 'https://osswebcdn.zbom.com/jiaxuan/images/'
diff --git a/wechat_staff/utils/request.js b/wechat_staff/utils/request.js
index 7d34329..61723df 100644
--- a/wechat_staff/utils/request.js
+++ b/wechat_staff/utils/request.js
@@ -19,9 +19,9 @@
         if (res.data.code === 200) {
           resolve(res.data || true)
         } else {
-          if(res.data.code && res.data.code == 5112){
+          if(res.data.code && (res.data.code == 5112 || res.data.code == 5111)){ 
             wx.navigateTo({
-              url: '/pages/auth/auth',
+              url: '/pages/login/index',
             })
           }
           res.data.message && wx.showToast({

--
Gitblit v1.9.3