From ac0b3ba41104180fd45cc94334bc3c760c2895a4 Mon Sep 17 00:00:00 2001
From: liukangdong <898885815@qq.com>
Date: 星期二, 23 七月 2024 14:05:36 +0800
Subject: [PATCH] ''

---
 wechat_jiaxuan/pages/detailDis/product.js     |    1 
 wechat_staff/utils/config.js                  |    1 
 wechat_staff/pages/userinfo/index.wxml        |   44 ++-
 wechat_staff/pages/store/info.wxss            |   26 +-
 wechat_staff/pages/store/staff.json           |    3 
 wechat_staff/pages/store/staff.less           |   48 ++++
 wechat_staff/pages/store/staff.wxml           |   32 +-
 wechat_staff/static/images/default_avatar.png |    0 
 wechat_staff/pages/userinfo/index.less        |   14 +
 wechat_jiaxuan/pages/detailDis/product.wxml   |    2 
 wechat_staff/project.private.config.json      |    7 
 wechat_staff/pages/store/info.js              |    8 
 wechat_staff/pages/store/staff.wxss           |   82 +++----
 wechat_staff/pages/userinfo/index.js          |  182 ++++++++++++++++-
 wechat_staff/pages/store/info.wxml            |    4 
 wechat_staff/app.json                         |    3 
 wechat_staff/pages/store/staff.js             |   85 ++++++--
 wechat_staff/pages/userinfo/index.wxss        |   12 +
 wechat_staff/api/index.js                     |   16 
 wechat_staff/pages/store/info.less            |   16 +
 20 files changed, 430 insertions(+), 156 deletions(-)

diff --git a/wechat_jiaxuan/pages/detailDis/product.js b/wechat_jiaxuan/pages/detailDis/product.js
index c62e89e..a9c7492 100644
--- a/wechat_jiaxuan/pages/detailDis/product.js
+++ b/wechat_jiaxuan/pages/detailDis/product.js
@@ -15,7 +15,6 @@
     member: {},
     showShare: false
   },
-
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
diff --git a/wechat_jiaxuan/pages/detailDis/product.wxml b/wechat_jiaxuan/pages/detailDis/product.wxml
index f186350..fffb970 100644
--- a/wechat_jiaxuan/pages/detailDis/product.wxml
+++ b/wechat_jiaxuan/pages/detailDis/product.wxml
@@ -38,7 +38,7 @@
   </view>
   <!-- 瀵屾枃鏈� -->
   <view>
-    <!-- <mp-html content="{{info.content}}"></mp-html> -->
+    <mp-html content="{{info.content}}"></mp-html>
   </view>
   <view class="spaceList">
     <view class="item" wx:for="{{ info.spaceList }}">
diff --git a/wechat_staff/api/index.js b/wechat_staff/api/index.js
index 46f8d12..a8c1d52 100644
--- a/wechat_staff/api/index.js
+++ b/wechat_staff/api/index.js
@@ -52,6 +52,14 @@
     url: '/web/personnel/getUserDetail',
   })
 }
+// 鏇存柊浼氬憳淇℃伅
+export const editMember = (data) => {
+  return request({
+    url: '/web/personnel/editUsers',
+    method: 'POST',
+    data
+  })
+}
 // 棣栭〉 姣忔棩涓婃柊
 export const getDailyUpdates = (data) => {
   return request({
@@ -132,14 +140,6 @@
 export const getShopDetail = (data) => {
   return request({
     url: '/web/personnel/shopDetail?shopId='+data,
-    data
-  })
-}
-// 鏇存柊浼氬憳淇℃伅
-export const editMember = (data) => {
-  return request({
-    url: '/web/customer/editMember',
-    method: 'POST',
     data
   })
 }
diff --git a/wechat_staff/app.json b/wechat_staff/app.json
index bb548e0..6adfe2c 100644
--- a/wechat_staff/app.json
+++ b/wechat_staff/app.json
@@ -72,6 +72,9 @@
   "permission": {
     "scope.userLocation": {
       "desc": "浣犵殑浣嶇疆淇℃伅灏嗙敤浜庡皬绋嬪簭浣嶇疆鎺ュ彛鐨勬晥鏋滃睍绀�"
+    },
+    "scope.writePhotosAlbum":{
+      "desc": "鎺堟潈鐩稿唽鏉冮檺鍚庯紝鎮ㄦ墠鑳芥甯镐繚瀛樺浘鐗�"
     }
   },
   "componentFramework": "glass-easel",
diff --git a/wechat_staff/pages/store/info.js b/wechat_staff/pages/store/info.js
index af51976..530ab33 100644
--- a/wechat_staff/pages/store/info.js
+++ b/wechat_staff/pages/store/info.js
@@ -12,13 +12,19 @@
     address:'',
     latitude:'',
     longitude:'',
-    shopInfo:{}
+    shopInfo:{},
+
+    bottomLift: 0
   },
 
   /**
    * 鐢熷懡鍛ㄦ湡鍑芥暟--鐩戝惉椤甸潰鍔犺浇
    */
   onLoad(options) {
+    var app = getApp().globalData
+    this.setData({
+      bottomLift: app.bottomLift
+    })
     const obj =JSON.parse(options.data);
     this.setData({shopInfo: obj ,
       linkPhone:obj.linkPhone,
diff --git a/wechat_staff/pages/store/info.less b/wechat_staff/pages/store/info.less
index 10be0d8..951f7fd 100644
--- a/wechat_staff/pages/store/info.less
+++ b/wechat_staff/pages/store/info.less
@@ -17,7 +17,7 @@
       justify-content: flex-end;
       .input{
         text-align: right;
-        max-width: 450rpx;
+        width: 100%;
         white-space: nowrap;
         overflow: hidden;//鏂囨湰瓒呭嚭闅愯棌
         text-overflow: ellipsis;
@@ -30,4 +30,18 @@
       }
     }
   }
+}
+.bottombtn{
+  position: fixed;
+  left: 40rpx;
+  width: 670rpx;
+  height: 88rpx;
+  background: #B08771;
+  border-radius: 8rpx;
+  font-weight: 500;
+  font-size: 32rpx;
+  color: #FFFFFF;
+  display: flex;
+  justify-content: center;
+  align-items: center;
 }
\ No newline at end of file
diff --git a/wechat_staff/pages/store/info.wxml b/wechat_staff/pages/store/info.wxml
index ae2a0df..03b5b89 100644
--- a/wechat_staff/pages/store/info.wxml
+++ b/wechat_staff/pages/store/info.wxml
@@ -26,7 +26,5 @@
       </view>
     </view>  
   </view>
-  <view class="bottombtn">
-      <button bind:tap="saveInfo" class="savebutton">淇濆瓨</button>
-  </view>
+  <view bindtap="saveInfo" style="bottom: {{ bottomLift }}px"  class="bottombtn">淇濆瓨</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 090fd2b..8275dba 100644
--- a/wechat_staff/pages/store/info.wxss
+++ b/wechat_staff/pages/store/info.wxss
@@ -20,7 +20,7 @@
 }
 .list .line .val .input {
   text-align: right;
-  max-width: 450rpx;
+  width: 100%;
   white-space: nowrap;
   overflow: hidden;
   text-overflow: ellipsis;
@@ -31,17 +31,17 @@
 .list .line .val .icon {
   width: 40rpx;
 }
-.bottombtn{
+.bottombtn {
   position: fixed;
-  bottom: 0px;
-  width: 100%;
-  padding: 20px;
-}
-.savebutton{
-  bottom: 20px;
-  width: 100%; 
-  border: none;
-  color: white;
+  left: 40rpx;
+  width: 670rpx;
+  height: 88rpx;
   background: #B08771;
-  border-radius: 8px;
-}
\ No newline at end of file
+  border-radius: 8rpx;
+  font-weight: 500;
+  font-size: 32rpx;
+  color: #FFFFFF;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+}
diff --git a/wechat_staff/pages/store/staff.js b/wechat_staff/pages/store/staff.js
index 923677f..83549a1 100644
--- a/wechat_staff/pages/store/staff.js
+++ b/wechat_staff/pages/store/staff.js
@@ -1,6 +1,7 @@
-// pages/store/staff.jsdownloadImg
-import { getUserCard } from '../../api/index'
-import { downloadImg } from '../../utils/common'
+import {
+  getUserCard
+} from '../../api/index'
+// import { downloadImg } from '../../utils/common'
 Page({
 
   /**
@@ -8,10 +9,10 @@
    */
   data: {
     bottomLift: 0,
-    isShow: false,
-    userCard:'',
+    isShow: true,
+    userCard: '',
     isShow2: false,
-    userInfo:{}
+    userInfo: {}
   },
 
   /**
@@ -20,39 +21,73 @@
   onLoad(options) {
     var app = getApp().globalData
     var userType = options.userType
-   
-    if(userType == 1){
+
+    if (userType == 1) {
       //濡傛灉鏌ヨ鑷繁鐨勪俊鎭�
-      this.setData({userInfo: wx.getStorageSync('member')})
+      this.setData({
+        userInfo: wx.getStorageSync('member')
+      })
       console.log(this.data)
-    } 
+    }
     this.setData({
       bottomLift: app.bottomLift
     })
   },
-  showQrcode(){
-    this.setData({isShow:true}) 
+  showQrcode() {
+    this.setData({
+      isShow: true
+    })
   },
-  closeCard(){
-    this.setData({isShow2: false})
+  closeCard() {
+    this.setData({
+      isShow2: false
+    })
   },
-
-  
-  saveCard(){
-   downloadImg(this.data.userCard);
+  saveCard() {
+    wx.downloadFile({
+      url: this.data.userCard,
+      success: function (res) {
+        console.log('涓嬭浇鎴愬姛', res);
+        wx.saveImageToPhotosAlbum({
+          filePath: res.tempFilePath,
+          success(result) {
+            console.log(result)
+            wx.showToast({
+              title: '淇濆瓨鎴愬姛',
+              icon: 'success',
+              duration: 2000
+            })
+          }
+        })
+        // wx.saveFile({
+        //   tempFilePath: res.tempFilePath,
+        //   success: function (res) {
+        //     console.log(res.savedFilePath)
+        //   }
+        // })
+      }
+    })
   },
   openModal() {
-    if(this.data.userCard !=null && this.data.userCard != ''){
-      this.setData({isShow2: 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})
-    }) 
+    getUserCard().then(res => {
+      this.setData({
+        userCard: res.data
+      })
+      this.setData({
+        isShow2: true
+      })
+    })
   },
   onClose() {
-    this.setData({isShow: false})
+    this.setData({
+      isShow: false
+    })
   },
 
   /**
diff --git a/wechat_staff/pages/store/staff.json b/wechat_staff/pages/store/staff.json
index 15a2e8f..6181a6b 100644
--- a/wechat_staff/pages/store/staff.json
+++ b/wechat_staff/pages/store/staff.json
@@ -1,7 +1,8 @@
 {
   "usingComponents": {
     "van-popup": "@vant/weapp/popup/index",
-    "back": "../../components/back/index"
+    "back": "../../components/back/index",
+    "van-overlay": "@vant/weapp/overlay/index"
   },
   "navigationStyle": "custom"
 }
\ No newline at end of file
diff --git a/wechat_staff/pages/store/staff.less b/wechat_staff/pages/store/staff.less
index 71f2384..e832f51 100644
--- a/wechat_staff/pages/store/staff.less
+++ b/wechat_staff/pages/store/staff.less
@@ -6,17 +6,20 @@
   position: fixed;
   top: 0;
   left: 0;
-  z-index: -1;
+  z-index: 1;
 }
 
 .container {
   padding: 26rpx 40rpx;
+  background-color: #fff;
   .avatar {
     margin-top: 260rpx;
     width: 140rpx;
     height: 140rpx;
     border-radius: 50%;
     border: 4rpx solid #FFFFFF;
+    position: relative;
+    z-index: 2;
   }
   .desc {
     display: flex;
@@ -108,9 +111,8 @@
 
   .line {
     display: flex;
-    align-items: center;
     font-size: 30rpx;
-    margin-bottom: 42rpx;
+    margin-bottom: 40rpx;
     .icon {
       width: 30rpx;
     }
@@ -118,6 +120,10 @@
       color: #777777;
       margin-left: 24rpx;
       margin-right: 44rpx;
+      width: 140rpx;
+    }
+    .val{
+      flex: 1;
     }
   }
 }
@@ -179,4 +185,40 @@
     color: #999999;
     text-align: center;
   }
+}
+.card_wrap{
+  position: fixed;
+  border-radius: 8rpx;
+  top: 50%;
+  left: 75rpx;
+  transform: translate(0, -50%);
+  width: 600rpx;
+  background-color: rgba(0, 0, 0, .2);
+  z-index: 999;
+  .img1{
+    image{
+      width: 600rpx;
+      border-radius: 8rpx ;
+    }
+  }
+  .btns{
+    margin-top: 30rpx;
+    display: flex;
+    justify-content: space-between;
+    width: 100%;
+    .btn{
+      width: 290rpx;
+      height: 88rpx;
+      border-radius: 8rpx;
+      border: 2rpx solid #FFFFFF;
+      display: flex;
+      justify-content: center;
+      align-items: center;
+      color: #fff;
+    }
+    .save{
+      border: none;
+      background: linear-gradient( 180deg, #E0B49C 0%, #B68B74 100%);
+    }
+  }
 }
\ No newline at end of file
diff --git a/wechat_staff/pages/store/staff.wxml b/wechat_staff/pages/store/staff.wxml
index 522ef83..c02b291 100644
--- a/wechat_staff/pages/store/staff.wxml
+++ b/wechat_staff/pages/store/staff.wxml
@@ -39,7 +39,7 @@
         <text class="val">{{userInfo.shopName}}</text>
       </view>
       <view class="line">
-        <image class="icon" src="../../static/icon/mingpian_ic_dizhi@2x.png" mode="widthFix" style="width: 45rpx;"  ></image>
+        <image class="icon" src="../../static/icon/mingpian_ic_dizhi@2x.png" mode="widthFix"></image>
         <text class="label">闂ㄥ簵鍦板潃</text>
         <text class="val">{{userInfo.shopAddress}}</text>
       </view>
@@ -47,32 +47,34 @@
   </view>
   <!-- footer -->
   <view class="footer" style="bottom: {{bottomLift}}px;">
-    <view class="btn"  bindtap="openModal">
+    <view class="btn" bindtap="openModal">
       <image src="../../static/icon/share.png" mode="widthFix"></image>
       <view>鍒嗕韩</view>
     </view>
   </view>
   <!-- 璇︽儏 -->
-  <van-popup show="{{ isShow }}"  closeable round bind:close="onClose">
+  <van-popup show="{{ isShow }}" closeable round bind:close="onClose">
     <view class="modal">
       <view class="header">
         <image class="avatar" src="{{userInfo.imgurlFull}}"></image>
         <view class="content">
-            <view class="name">{{userInfo.name}}</view>
-            <view class="desc">瀵艰喘 锝� {{userInfo.jobDate ||'0'}}骞寸粡楠�</view>
+          <view class="name">{{userInfo.name}}</view>
+          <view class="desc">瀵艰喘 锝� {{userInfo.jobDate ||'0'}}骞寸粡楠�</view>
         </view>
       </view>
       <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>prod
\ No newline at end of file
+  <!-- 鐢ㄦ埛鍚嶇墖 -->
+  <view wx:if="{{ isShow2 }}" class="card_wrap">
+    <view class="img1">
+      <image mode="widthFix" src="{{userCard}}"></image>
+    </view>
+    <view class="btns">
+      <view class="btn" bind:tap="closeCard">鍙栨秷</view>
+      <view class="btn save" bind:tap="saveCard">淇濆瓨鍒扮浉鍐�</view>
+    </view>
+  </view>
+  <van-overlay z-index="10" show="{{ isShow2 }}" bind:click="onClickHide" />
+</view>
\ No newline at end of file
diff --git a/wechat_staff/pages/store/staff.wxss b/wechat_staff/pages/store/staff.wxss
index 550aac7..976570e 100644
--- a/wechat_staff/pages/store/staff.wxss
+++ b/wechat_staff/pages/store/staff.wxss
@@ -5,10 +5,11 @@
   position: fixed;
   top: 0;
   left: 0;
-  z-index: -1;
+  z-index: 1;
 }
 .container {
   padding: 26rpx 40rpx;
+  background-color: #fff;
 }
 .container .avatar {
   margin-top: 260rpx;
@@ -16,6 +17,8 @@
   height: 140rpx;
   border-radius: 50%;
   border: 4rpx solid #FFFFFF;
+  position: relative;
+  z-index: 2;
 }
 .container .desc {
   display: flex;
@@ -94,17 +97,20 @@
 }
 .guide .line {
   display: flex;
-  align-items: center;
   font-size: 30rpx;
-  margin-bottom: 42rpx;
+  margin-bottom: 40rpx;
 }
 .guide .line .icon {
-  width: 30rpx;  
+  width: 30rpx;
 }
 .guide .line .label {
   color: #777777;
-  min-width: 140rpx;
-  margin-left: 24rpx; 
+  margin-left: 24rpx;
+  margin-right: 44rpx;
+  width: 140rpx;
+}
+.guide .line .val {
+  flex: 1;
 }
 .footer {
   display: flex;
@@ -165,51 +171,37 @@
   color: #999999;
   text-align: center;
 }
-.modalcard{
-  display: inline-block;
+.card_wrap {
+  position: fixed;
+  border-radius: 8rpx;
+  top: 50%;
+  left: 75rpx;
+  transform: translate(0, -50%);
   width: 600rpx;
-  height: 1100rpx;   
-  box-sizing: border-box;   
+  background-color: rgba(0, 0, 0, 0.2);
+  z-index: 999;
 }
-.modalcard .img1{ 
+.card_wrap .img1 image {
+  width: 600rpx;
+  border-radius: 8rpx ;
+}
+.card_wrap .btns {
+  margin-top: 30rpx;
+  display: flex;
+  justify-content: space-between;
   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; 
+.card_wrap .btns .btn {
+  width: 290rpx;
+  height: 88rpx;
+  border-radius: 8rpx;
   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;
+  color: #fff;
+}
+.card_wrap .btns .save {
   border: none;
-} 
-
+  background: linear-gradient(180deg, #E0B49C 0%, #B68B74 100%);
+}
diff --git a/wechat_staff/pages/userinfo/index.js b/wechat_staff/pages/userinfo/index.js
index 9bb89ab..fd0231b 100644
--- a/wechat_staff/pages/userinfo/index.js
+++ b/wechat_staff/pages/userinfo/index.js
@@ -1,10 +1,26 @@
-// pages/userinfo/index.js
+import {
+  getMemberInfo,
+  editMember,
+  uploadUrl
+} from '../../api/index'
 Page({
 
   /**
    * 椤甸潰鐨勫垵濮嬫暟鎹�
    */
   data: {
+    editFalg: false,
+    slogans: '',
+    costomerNum: '',
+    qrcodeImg: '',
+    qrcodeImgFull: '',
+    companyQrcodeImg: '',
+    companyQrcodeImgFull: '',
+    userInfo: {
+      name: '',
+      phone: '',
+      jobDate: '',
+    },
     endDate: '', // 鑾峰彇褰撳墠骞�
 
     // 涓嬮潰涓哄疄渚�
@@ -14,14 +30,58 @@
   },
   onLoad(options) {
     const endDate = new Date().getFullYear() + '-09-01'
-    this.setData({endDate})
-    console.log('endYear', endDate);
+    this.setData({
+      endDate
+    })
+    this.getUserInfo()
+  },
+  startEdit() {
+    this.setData({
+      editFalg: true
+    })
   },
   onSubmit() {
-
+    console.log('鐐逛簡');
+    const {
+      slogans,
+      costomerNum,
+      userInfo
+    } = this.data
+    editMember({
+      ...userInfo,
+      slogans,
+      costomerNum
+    }).then(res => {
+      this.setData({
+        editFalg: false
+      })
+      wx.showToast({
+        title: '淇℃伅淇濆瓨鎴愬姛',
+      })
+    })
+  },
+  getUserInfo() {
+    getMemberInfo().then(res => {
+      this.setData({
+        userInfo: res.data,
+        slogans: res.data.slogans,
+        costomerNum: res.data.costomerNum,
+        qrcodeImgFull: res.data.qrcodeImgFull,
+        qrcodeImg: res.data.qrcodeImg,
+        companyQrcodeImgFull: res.data.companyQrcodeImgFull,
+        companyQrcodeImg: res.data.companyQrcodeImg,
+      })
+    })
   },
   bindDateChange(e) {
-    console.log('鐐瑰嚮浜�', e.detail.value);
+    const {
+      userInfo
+    } = this.data
+    const endDate = new Date().getFullYear()
+    userInfo.jobDate = endDate - e.detail.value
+    this.setData({
+      userInfo
+    })
   },
   bindRegionChange(e) {
     console.log('picker鍙戦�侀�夋嫨鏀瑰彉锛屾惡甯﹀�间负', e.detail.value)
@@ -29,19 +89,107 @@
       region: e.detail.value
     })
   },
+  getBindchooseavatar(e) {
+    var that = this
+    const { userInfo } = this.data
+    if (e.detail.avatarUrl) {
+      wx.uploadFile({
+        url: uploadUrl,
+        filePath: e.detail.avatarUrl,
+        name: 'file',
+        success (res) {
+          console.log(JSON.parse(res.data))
+          let data = JSON.parse(ress.data)
+          userInfo.imgurl = data.data.imgaddr
+          userInfo.imgurlFull = data.data.url
+          this.setData({userInfo})
+        }
+      })
+    }
+  },
   selMedia() {
-    console.log('dianjile');
-    wx.chooseMedia({
-      count: 1,
-      mediaType: ['image'],
-      sourceType: ['album', 'camera'],
-      maxDuration: 16,
-      camera: 'back',
-      success(res) {
-        console.log(res.tempFiles[0].tempFilePath)
-        console.log(res.tempFiles[0].size)
-      }
-    })
+    const {
+      editFalg,
+      qrcodeImgFull
+    } = this.data
+    if (editFalg) {
+      wx.chooseMedia({
+        count: 1,
+        mediaType: ['image'],
+        sourceType: ['album', 'camera'],
+        maxDuration: 16,
+        camera: 'back',
+        success: (res) => {
+          // console.log(res.tempFiles[0].tempFilePath)
+          // console.log(res.tempFiles[0].size)
+          wx.uploadFile({
+            url: uploadUrl,
+            filePath: res.tempFiles[0].tempFilePath,
+            name: 'file',
+            formData: {
+              folder: 'member'
+            },
+            header: {
+              token: wx.getStorageSync('token')
+            },
+            success: (ress) => {
+              console.log('ress', JSON.parse(ress.data));
+              let data = JSON.parse(ress.data)
+              this.setData({
+                qrcodeImg: data.data.imgaddr,
+                qrcodeImgFull: data.data.url,
+              })
+            }
+          })
+        }
+      })
+    } else {
+      wx.previewImage({
+        urls: [qrcodeImgFull],
+      })
+    }
+  },
+  selMedia2() {
+    const {
+      editFalg,
+      companyQrcodeImgFull
+    } = this.data
+    if (editFalg) {
+      wx.chooseMedia({
+        count: 1,
+        mediaType: ['image'],
+        sourceType: ['album', 'camera'],
+        maxDuration: 16,
+        camera: 'back',
+        success: (res) => {
+          // console.log(res.tempFiles[0].tempFilePath)
+          // console.log(res.tempFiles[0].size)
+          wx.uploadFile({
+            url: uploadUrl,
+            filePath: res.tempFiles[0].tempFilePath,
+            name: 'file',
+            formData: {
+              folder: 'member'
+            },
+            header: {
+              token: wx.getStorageSync('token')
+            },
+            success: (ress) => {
+              console.log('ress', JSON.parse(ress.data));
+              let data = JSON.parse(ress.data)
+              this.setData({
+                companyQrcodeImg: data.data.imgaddr,
+                companyQrcodeImgFull: data.data.url,
+              })
+            }
+          })
+        }
+      })
+    }else{
+      wx.previewImage({
+        urls: [companyQrcodeImgFull],
+      })
+    }
   },
   onReady() {
 
diff --git a/wechat_staff/pages/userinfo/index.less b/wechat_staff/pages/userinfo/index.less
index 76e6ee5..6de6e21 100644
--- a/wechat_staff/pages/userinfo/index.less
+++ b/wechat_staff/pages/userinfo/index.less
@@ -5,7 +5,6 @@
   border-radius: 50%;
   box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(0,0,0,0.08);
   border: 4rpx solid #FFFFFF;
-  border: 1px solid;
 }
 .avatar_btn{
   width: 168rpx;
@@ -25,6 +24,9 @@
     display: flex;
     align-items: center;
     border-bottom: 1rpx solid #e5e5e5;
+    .qrcode{
+      width: 40rpx;
+    }
     .label{
       width: 210rpx;
       font-size: 30rpx;
@@ -34,6 +36,16 @@
       flex: 1;
       color: #111111;
       text-align: right;
+      .van-cell{
+        padding: 0;
+      }
+      .picker{
+        .picker_wrap{
+          display: flex;
+          align-items: center;
+          justify-content: flex-end;
+        }
+      }
     }
     input{
       text-align: right;
diff --git a/wechat_staff/pages/userinfo/index.wxml b/wechat_staff/pages/userinfo/index.wxml
index 812d76a..6cf78b7 100644
--- a/wechat_staff/pages/userinfo/index.wxml
+++ b/wechat_staff/pages/userinfo/index.wxml
@@ -1,63 +1,69 @@
 <view class="container">
-  <image class="avatar" src="" mode="widthFix"></image>
-  <view bindtap="selMedia" class="avatar_btn">鏇存崲澶村儚</view>
+  <image class="avatar" src="{{ userInfo.imgurlFull ? userInfo.imgurlFull : '../../static/images/default_avatar.png' }}" mode="widthFix"></image>
+  <button open-type="chooseAvatar" bindchooseavatar="getBindchooseavatar" class="avatar_btn">鏇存崲澶村儚</button>
   <view class="list">
     <view class="line">
       <view class="label">濮撳悕</view>
-      <van-field type="text" border="{{false}}" class="input" model:value="{{ name }}" maxlength="{{ 18 }}" clearable />
+      <view class="input">{{ userInfo.name }}</view>
     </view>
     <view class="line">
       <view class="label">鐢佃瘽</view>
-      <van-field type="number" border="{{false}}" class="input" model:value="{{ name }}" maxlength="{{ 11 }}" clearable />
+      <view class="input">{{ userInfo.phone }}</view>
     </view>
     <view class="line">
       <view class="label">绛惧悕</view>
-      <van-field type="text" border="{{false}}" class="input" model:value="{{ endDate }}" maxlength="{{ 18 }}" clearable />
+      <van-field wx:if="{{ editFalg }}" type="text" border="{{false}}" class="input" model:value="{{ slogans }}" maxlength="{{ 18 }}" clearable />
+      <view wx:else class="input">{{ slogans }}</view>
     </view>
     <view class="line">
       <view class="label">浠庝笟骞撮檺</view>
       <view class="val">
-        <view class="input">
-          <picker mode="date" value="{{date}}" fields="year" start="1970-09-01" end="{{endDate}}" bindchange="bindDateChange">
-            <view class="picker">
-              褰撳墠閫夋嫨: {{endDate}}
+        <view wx:if="{{ editFalg }}" class="input">
+          <picker class="picker" mode="date" value="{{date}}" fields="year" start="1970-09-01" end="{{endDate}}" bindchange="bindDateChange">
+            <view class="picker_wrap">
+              <view>{{ userInfo.jobDate }} <text wx:if="{{ userInfo.jobDate || userInfo.jobDate == 0 }}">骞�</text></view>
+              <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image>
             </view>
           </picker>
         </view>
-        <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image>
+        <view wx:else class="input"><text>{{ userInfo.jobDate }} 骞�</text></view>
       </view>
     </view>
     <view class="line">
       <view class="label">鏈嶅姟瀹㈡埛</view>
-      <van-field type="text" border="{{false}}" class="input" model:value="{{ name }}" maxlength="{{ 5 }}" clearable />
+      <van-field wx:if="{{ editFalg }}" type="text" border="{{false}}" class="input" model:value="{{ costomerNum }}" maxlength="{{ 5 }}" clearable />
+      <view wx:else class="input">{{ costomerNum }}</view>
     </view>
     <view class="line">
       <view class="label">闂ㄥ簵鍚嶇О</view>
-      <view class="input">鍚嶇О</view>
+      <view class="input">{{ userInfo.shopName }}</view>
     </view>
     <view class="line">
       <view class="label">闂ㄥ簵鍩庡競</view>
-      <view class="input">鍚嶇О</view>
+      <view class="input">{{ userInfo.shopCity }}</view>
     </view>
     <view class="line">
       <view class="label">闂ㄥ簵鍦板潃</view>
-      <view class="input">鍚嶇О</view>
+      <view class="input">{{ userInfo.shopAddress }}</view>
     </view>
     <view class="line">
       <view class="label">寰俊浜岀淮鐮�</view>
-      <view class="val" bindtap="changeAddr">
-        <view class="input">{{ address }}</view>
+      <view class="val" bindtap="selMedia">
+        <view class="input"></view>
+        <image class="qrcode" mode="widthFix" src="../../static/icon/mingpian_erweima@2x.png"></image>
         <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image>
       </view>
     </view>
     <view class="line">
       <view class="label">浼佷笟寰俊浜岀淮鐮�</view>
-      <view class="val" bindtap="changeAddr">
-        <view class="input">{{ address }}</view>
+      <view class="val" bindtap="selMedia2">
+        <view class="input"></view>
+        <image class="qrcode" mode="widthFix" src="../../static/icon/mingpian_erweima@2x.png"></image>
         <image class="icon" src="../../static/icon/home_ar@2x.png" mode="widthFix"></image>
       </view>
     </view>
-    <view bindtap="onSubmit" class="save">淇濆瓨</view>
+    <view wx:if="{{ !editFalg }}" bindtap="startEdit" class="save">缂栬緫</view>
+    <view wx:else bindtap="onSubmit" class="save">淇濆瓨</view>
   </view>
   <!--  -->
 </view>
\ No newline at end of file
diff --git a/wechat_staff/pages/userinfo/index.wxss b/wechat_staff/pages/userinfo/index.wxss
index fefce19..f43b07c 100644
--- a/wechat_staff/pages/userinfo/index.wxss
+++ b/wechat_staff/pages/userinfo/index.wxss
@@ -5,7 +5,6 @@
   border-radius: 50%;
   box-shadow: 0rpx 2rpx 12rpx 0rpx rgba(0, 0, 0, 0.08);
   border: 4rpx solid #FFFFFF;
-  border: 1px solid;
 }
 .avatar_btn {
   width: 168rpx;
@@ -27,6 +26,9 @@
   align-items: center;
   border-bottom: 1rpx solid #e5e5e5;
 }
+.list .line .qrcode {
+  width: 40rpx;
+}
 .list .line .label {
   width: 210rpx;
   font-size: 30rpx;
@@ -37,6 +39,14 @@
   color: #111111;
   text-align: right;
 }
+.list .line .input .van-cell {
+  padding: 0;
+}
+.list .line .input .picker .picker_wrap {
+  display: flex;
+  align-items: center;
+  justify-content: flex-end;
+}
 .list .line input {
   text-align: right;
 }
diff --git a/wechat_staff/project.private.config.json b/wechat_staff/project.private.config.json
index 246436e..119a266 100644
--- a/wechat_staff/project.private.config.json
+++ b/wechat_staff/project.private.config.json
@@ -35,6 +35,13 @@
           "query": "",
           "launchMode": "default",
           "scene": null
+        },
+        {
+          "name": "",
+          "pathName": "pages/userinfo/index",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
         }
       ]
     }
diff --git a/wechat_staff/static/images/default_avatar.png b/wechat_staff/static/images/default_avatar.png
new file mode 100644
index 0000000..229d40e
--- /dev/null
+++ b/wechat_staff/static/images/default_avatar.png
Binary files differ
diff --git a/wechat_staff/utils/config.js b/wechat_staff/utils/config.js
index 4933b48..edb7f8d 100644
--- a/wechat_staff/utils/config.js
+++ b/wechat_staff/utils/config.js
@@ -7,7 +7,6 @@
 // export const imageUrl = 'https://osswebcdn.zbom.com/jiaxuan/images/'
 
 // export const baseUrl = 'https://dmtest.ahapp.net/web_interface/' // 娴嬭瘯鏈�
-export const baseUrl = 'http://192.168.0.135:10027' // 鏈湴 
  
 // 鑵捐鍦板浘寮�鍙戣�� key
 export const qqMapKey = 'HIDBZ-2QXL4-TAWUD-XET6Q-EKTJE-CCBSQ'

--
Gitblit v1.9.3