| Before Width: | Height: | Size: 1.9 KiB | 
| Before Width: | Height: | Size: 3.6 KiB | 
| Before Width: | Height: | Size: 6.4 KiB | 
| Before Width: | Height: | Size: 27 KiB | 
| Before Width: | Height: | Size: 1.1 KiB | 
| Before Width: | Height: | Size: 1.8 KiB | 
| Before Width: | Height: | Size: 6.5 KiB | 
| Before Width: | Height: | Size: 3.1 KiB After Width: | Height: | Size: 1.9 KiB | 
| Before Width: | Height: | Size: 1.5 KiB | 
| After Width: | Height: | Size: 994 B | 
| Before Width: | Height: | Size: 740 B | 
| Before Width: | Height: | Size: 2.8 KiB | 
| Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 1.7 KiB | 
| Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.7 KiB | 
| Before Width: | Height: | Size: 3.6 KiB | 
| Before Width: | Height: | Size: 3.4 KiB | 
| @ -1,260 +0,0 @@ | |||||
| var app = getApp(); |  | ||||
| var WXAPI = require('../../utils/server.js'); |  | ||||
| function getNowFormatDate() { |  | ||||
|   var date = new Date(); |  | ||||
|   var seperator1 = "-"; |  | ||||
|   var year = date.getFullYear(); |  | ||||
|   var month = date.getMonth() + 1; |  | ||||
|   var strDate = date.getDate(); |  | ||||
|   if (month >= 1 && month <= 9) { |  | ||||
|     month = "0" + month; |  | ||||
|   } |  | ||||
|   if (strDate >= 0 && strDate <= 9) { |  | ||||
|     strDate = "0" + strDate; |  | ||||
|   } |  | ||||
|   var currentdate = year + seperator1 + month + seperator1 + strDate; |  | ||||
|   return currentdate; |  | ||||
| }; |  | ||||
| Page({ |  | ||||
|   /** |  | ||||
|    * 页面的初始数据 |  | ||||
|    */ |  | ||||
|   data: { |  | ||||
|     inp_money: 0, |  | ||||
|     iv: '', |  | ||||
|     encryptedData: '', |  | ||||
|     islogin: false, |  | ||||
|     remind: '加载中', |  | ||||
|     bank_name: '', |  | ||||
|     binding: false, |  | ||||
|     multiIndex: [0, 0, 0], |  | ||||
|     date: '2020-07-01', |  | ||||
|     time: '12:01', |  | ||||
|     region: ['湖南省', '长沙市', '岳麓区'], |  | ||||
|     customItem: '全部', |  | ||||
|     items: [ |  | ||||
|       { name: '1', value: '男', checked: true }, |  | ||||
|       { name: '2', value: '女', checked: false }, |  | ||||
|     ], |  | ||||
|     sex: 1 |  | ||||
|   }, |  | ||||
|   //页面加载完成函数
 |  | ||||
|   onReady: function () { |  | ||||
| 
 |  | ||||
|   }, |  | ||||
|   radioChange: function (e) { |  | ||||
|     var items = this.data.items; |  | ||||
|     for (var i = 0; i < items.length; i++) { |  | ||||
|       if (items[i].name == e.detail.value) { |  | ||||
|         items[i].checked = true; |  | ||||
|       } else { |  | ||||
|         items[i].checked = false; |  | ||||
|       } |  | ||||
|     } |  | ||||
|     this.setData({ |  | ||||
|       items: items, |  | ||||
|       sex: e.detail.value |  | ||||
|     }) |  | ||||
| 
 |  | ||||
|   }, |  | ||||
|   bindPickerChange: function (e) { |  | ||||
|     console.log('picker发送选择改变,携带值为', e.detail.value) |  | ||||
|     this.setData({ |  | ||||
|       index: e.detail.value |  | ||||
|     }) |  | ||||
|   }, |  | ||||
|   bindMultiPickerChange: function (e) { |  | ||||
|     console.log('picker发送选择改变,携带值为', e.detail.value) |  | ||||
|     this.setData({ |  | ||||
|       multiIndex: e.detail.value |  | ||||
|     }) |  | ||||
|   }, |  | ||||
|   bindDateChange: function (e) { |  | ||||
|     console.log('picker发送选择改变,携带值为', e.detail.value) |  | ||||
|     this.setData({ |  | ||||
|       date: e.detail.value |  | ||||
|     }) |  | ||||
|   }, |  | ||||
|   bindTimeChange: function (e) { |  | ||||
|     console.log('picker发送选择改变,携带值为', e.detail.value) |  | ||||
|     this.setData({ |  | ||||
|       time: e.detail.value |  | ||||
|     }) |  | ||||
|   }, |  | ||||
|   bindRegionChange: function (e) { |  | ||||
|     console.log('picker发送选择改变,携带值为', e.detail.value) |  | ||||
|     this.setData({ |  | ||||
|       region: e.detail.value |  | ||||
|     }) |  | ||||
|   }, |  | ||||
|   /** |  | ||||
|    * 生命周期函数--监听页面加载 |  | ||||
|    */ |  | ||||
| 
 |  | ||||
|   onLoad: function () { |  | ||||
|     wx.checkSession({ |  | ||||
|       success: function (e) { |  | ||||
|         app.globalData.userInfo['session_key'] = app.globalData.userInfo.session_key; |  | ||||
|       }, |  | ||||
|       fail: function () { |  | ||||
|         wx.login({ |  | ||||
|           success: function (res) { |  | ||||
|             var code = res.code; |  | ||||
|             that.globalData.code = res.code; |  | ||||
|             //取出本地存储用户信息,解决需要每次进入小程序弹框获取用户信息
 |  | ||||
|             var userinfo = wx.getStorageSync('userInfo'); |  | ||||
|             that.globalData.userInfo = userinfo; |  | ||||
|             app.getUserSessionKey(code, cb); |  | ||||
|           } |  | ||||
|         }); //重新登录
 |  | ||||
|       } |  | ||||
|     }); |  | ||||
|     var date = getNowFormatDate(); |  | ||||
|     console.log(date) |  | ||||
|     this.setData({ |  | ||||
|       bgcolor: app.d.bgcolor, |  | ||||
|       date: date |  | ||||
|     }); |  | ||||
|     var that = this; |  | ||||
|     WXAPI.userPerfectIndex({ |  | ||||
|       user_id: app.globalData.userInfo.user_id |  | ||||
|     }).then(res => { |  | ||||
|       if (res.code == 200) { |  | ||||
|         var data = res; |  | ||||
| 
 |  | ||||
|         var items = that.data.items; |  | ||||
|         for (var i = 0; i < items.length; i++) { |  | ||||
|           if (items[i].name == data.sex) { |  | ||||
|             items[i].checked = true; |  | ||||
|           } else { |  | ||||
|             items[i].checked = false; |  | ||||
|           } |  | ||||
|         } |  | ||||
|         if (data.province) { |  | ||||
|           var region = [data.province, data.city, data.county]; |  | ||||
|         } else { |  | ||||
|           var region = that.data.region; |  | ||||
|         } |  | ||||
|         if (data.birthday) { |  | ||||
|           var date = data.birthday |  | ||||
|         } else { |  | ||||
|           var date = that.data.date; |  | ||||
|         } |  | ||||
| 
 |  | ||||
|         that.setData({ |  | ||||
|           name: data.name, |  | ||||
|           mobile: data.mobile, |  | ||||
|           binding: data.binding, |  | ||||
|           items: items, |  | ||||
|           region: region, |  | ||||
|           date: date, |  | ||||
|           wx_id: data.wechat_id, |  | ||||
|           sex: data.sex, |  | ||||
|           remind: '' |  | ||||
|         }); |  | ||||
|       } |  | ||||
|     }); |  | ||||
|   }, |  | ||||
|   renewal: function (e) { |  | ||||
|     var that = this; |  | ||||
|     that.setData({ |  | ||||
|       binding: !that.data.binding |  | ||||
|     }) |  | ||||
|   }, |  | ||||
|   // 获取手机号码
 |  | ||||
|   getPhoneNumber: function (e) { |  | ||||
|     var res_d = e; |  | ||||
|     var iv = e.detail.iv; |  | ||||
|     var encryptedData = e.detail.encryptedData; |  | ||||
|     var that = this; |  | ||||
|     if (e.detail.errMsg == 'getPhoneNumber:fail user deny') { |  | ||||
|       wx.showModal({ |  | ||||
|         title: '提示', |  | ||||
|         showCancel: false, |  | ||||
|         content: '未授权', |  | ||||
|         success: function (res) { } |  | ||||
|       }) |  | ||||
|     } else { |  | ||||
|       wx.showModal({ |  | ||||
|         title: '提示', |  | ||||
|         showCancel: false, |  | ||||
|         content: '同意授权', |  | ||||
|         success: function (res) { |  | ||||
|           WXAPI.userSecretKey({ |  | ||||
|             encryptedData: encryptedData, // 加密数据
 |  | ||||
|             iv: iv, // 加密算法
 |  | ||||
|             sessionId: app.globalData.userInfo.session_key |  | ||||
|           }).then(res => { |  | ||||
|             if (res.code == 200) { |  | ||||
|               var data = res; |  | ||||
|               that.setData({ |  | ||||
|                 islogin: true, |  | ||||
|                 mobile: data.info |  | ||||
|               }) |  | ||||
|             } else { |  | ||||
|               app.getUserInfo(that, res_d); |  | ||||
|             } |  | ||||
|           }); |  | ||||
|         } |  | ||||
|       }) |  | ||||
|     } |  | ||||
|   }, |  | ||||
|   // 获取信息
 |  | ||||
|   perfect: function (res) { |  | ||||
|     console.log(res) |  | ||||
|     var that = this; |  | ||||
|     var region = this.data.region; |  | ||||
| 
 |  | ||||
|     for (var i = 0; i < region.length; i++) { |  | ||||
|       if (region[i] == '全部') { |  | ||||
|         wx.showToast({ |  | ||||
|           title: '请完善地址!', |  | ||||
|           icon: 'none', |  | ||||
|           duration: 1500 |  | ||||
|         }) |  | ||||
|         return false; |  | ||||
|         break; |  | ||||
|       } |  | ||||
|     } |  | ||||
|     var sex = that.data.sex; |  | ||||
|     var province = region[0], city = region[1], county = region[2]; |  | ||||
|     if (res.detail.value.name.length == 0) { |  | ||||
|       wx.showToast({ |  | ||||
|         title: '姓名不得为空!', |  | ||||
|         icon: 'loading', |  | ||||
|         duration: 1500 |  | ||||
|       }) |  | ||||
|       wx.hideToast() |  | ||||
|     } else { |  | ||||
|       WXAPI.userPerfect({ |  | ||||
|         user_id: app.globalData.userInfo.user_id, |  | ||||
|         name: res.detail.value.name, |  | ||||
|         mobile: that.data.mobile, |  | ||||
|         province: province, |  | ||||
|         city: city, |  | ||||
|         county: county, |  | ||||
|         wx_id: res.detail.value.wx_id, |  | ||||
|         sex: sex, |  | ||||
|         date: that.data.date, |  | ||||
|       }).then(res => { |  | ||||
|         if (res.code == 200) { |  | ||||
|           var data = res; |  | ||||
|           wx.showToast({ |  | ||||
|             title: res.message, |  | ||||
|             icon: 'success', |  | ||||
|             duration: 3000 |  | ||||
|           }) |  | ||||
|         } else { |  | ||||
|           wx.showToast({ |  | ||||
|             title: res.message ? res.message : '非法操作!', |  | ||||
|             icon: 'none', |  | ||||
|             duration: 1500 |  | ||||
|           }); |  | ||||
|         } |  | ||||
|         wx.navigateBack({ |  | ||||
|           delta: 1 |  | ||||
|         }); |  | ||||
|       }); |  | ||||
|     } |  | ||||
|   }, |  | ||||
| }) |  | ||||
| @ -1 +0,0 @@ | |||||
| {"navigationBarTitleText":"完善信息"} |  | ||||
| @ -1,124 +0,0 @@ | |||||
| <view class="body" wx:if="{{remind}}"> |  | ||||
|   <view class='zong'> |  | ||||
|     <view class="spinner" > |  | ||||
|       <view class="spinner-container container1"> |  | ||||
|         <view class="circle1"></view> |  | ||||
|         <view class="circle2"></view> |  | ||||
|         <view class="circle3"></view> |  | ||||
|         <view class="circle4"></view> |  | ||||
|       </view> |  | ||||
|       <view class="spinner-container container2"> |  | ||||
|         <view class="circle1"></view> |  | ||||
|         <view class="circle2"></view> |  | ||||
|         <view class="circle3"></view> |  | ||||
|         <view class="circle4"></view> |  | ||||
|       </view> |  | ||||
|       <view class="spinner-container container3"> |  | ||||
|         <view class="circle1"></view> |  | ||||
|         <view class="circle2"></view> |  | ||||
|         <view class="circle3"></view> |  | ||||
|         <view class="circle4"></view> |  | ||||
|       </view> |  | ||||
|     </view> |  | ||||
|   </view> |  | ||||
| </view> |  | ||||
| <!-- 加载页面结束 --> |  | ||||
| <block wx:else> |  | ||||
|   <block wx:if="{{binding}}" > |  | ||||
|     <view class="binding_pic"> |  | ||||
|       <image src="/images/binding_pic.png" style="height:100%;width:288rpx;"></image> |  | ||||
|     </view> |  | ||||
|     <view class="binding_num"> |  | ||||
|       <view style="font-size:13px;display: flex;justify-content: center;margin-bottom:16rpx;">已绑定手机</view> |  | ||||
|       <view style="font-size:15px;display: flex;justify-content: center;">{{mobile}}</view> |  | ||||
|     </view> |  | ||||
|     <button bindtap="renewal" class="binding-footer">更换绑定</button> |  | ||||
|   </block> |  | ||||
|   <block wx:else > |  | ||||
|     <form bindsubmit="perfect"> |  | ||||
|       <view class="page"> |  | ||||
|         <view class="section"> |  | ||||
|           <view class="text"> |  | ||||
|             <text class='t_3'>您的姓名: </text> |  | ||||
|           </view> |  | ||||
|           <view class='inp'> |  | ||||
|             <input name="name" maxlength='10' style='font-size:13px;width:100%;' value='{{name}}' placeholder="姓名" type='text' /> |  | ||||
|           </view> |  | ||||
|         </view> |  | ||||
| 
 |  | ||||
|         <view class='xt'></view> |  | ||||
|         <view class="section"> |  | ||||
|           <view class="text"> |  | ||||
|             <text class='t_3'>性 别 : </text> |  | ||||
|           </view> |  | ||||
|           <view class='inp'> |  | ||||
|              |  | ||||
|             <radio-group class="radio-group" bindchange="radioChange"> |  | ||||
|               <label class="radio" wx:for="{{items}}"> |  | ||||
|                 <radio value="{{item.name}}" checked="{{item.checked}}" color='#FF6347'/>{{item.value}} |  | ||||
|               </label> |  | ||||
|             </radio-group> |  | ||||
| 
 |  | ||||
|           </view> |  | ||||
|         </view> |  | ||||
| 
 |  | ||||
|         <view class='xt'></view> |  | ||||
|         <view class="section"> |  | ||||
|           <view class="text"> |  | ||||
|             <text class='t_3'>手机号码: </text> |  | ||||
|           </view> |  | ||||
|            |  | ||||
|           <view class="Phone"> |  | ||||
|             {{mobile}} |  | ||||
|             <button class='sj_btn' open-type="getPhoneNumber" bindgetphonenumber="getPhoneNumber">获取手机号码</button> |  | ||||
|           </view> |  | ||||
|         </view> |  | ||||
| 
 |  | ||||
|         <view class='xt'></view> |  | ||||
|         <view class="section"> |  | ||||
|           <view class="text"> |  | ||||
|             <text class='t_3'>微信号 : </text> |  | ||||
|           </view> |  | ||||
|           <view class='inp'> |  | ||||
|             <input name="wx_id" maxlength='32' style='font-size:13px;width:100%;' value='{{wx_id}}' placeholder="微信号" type='text' /> |  | ||||
|           </view> |  | ||||
|         </view> |  | ||||
| 
 |  | ||||
|         <view class='xt'></view> |  | ||||
|         <view class="section"> |  | ||||
|           <view class="text"> |  | ||||
|             <text class='t_3'>出生日期: </text> |  | ||||
|           </view> |  | ||||
|           <view class='inp'> |  | ||||
|           <picker mode="date" value="{{date}}" start="1949-10-01" end="2017-09-01" bindchange="bindDateChange"> |  | ||||
|               <view class="picker"> |  | ||||
|                 {{date}} |  | ||||
|               </view> |  | ||||
|             </picker> |  | ||||
|           </view> |  | ||||
|         </view> |  | ||||
| 
 |  | ||||
|         <view class='xt'></view> |  | ||||
|         <view class="section"> |  | ||||
|           <view class="text"> |  | ||||
|             <text class='t_3'>所在城市: </text> |  | ||||
|           </view> |  | ||||
|           <view class='inp'> |  | ||||
|             <!-- <input name="name" maxlength='10' style='font-size:13px;width:100%;' value='{{name}}' placeholder="姓名" type='text' /> --> |  | ||||
| <picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}"> |  | ||||
|     <view class="picker"> |  | ||||
|     <text class='dpxzq'>{{region[0]}}</text><text class='dpxzq'>{{region[1]}}</text><text class='dpxzq'>{{region[2]}}</text> |  | ||||
|       <!-- {{region[0]}},{{region[1]}},{{region[2]}} --> |  | ||||
|     </view> |  | ||||
|   </picker> |  | ||||
| 
 |  | ||||
|           </view> |  | ||||
|         </view> |  | ||||
| 
 |  | ||||
|       </view> |  | ||||
|       <view> |  | ||||
|         <button form-type='submit' class="tx" style='background-color:#FF6347;border-radius:30px;'> 确认修改 </button> |  | ||||
|       </view> |  | ||||
|     </form> |  | ||||
|   </block> |  | ||||
| </block> |  | ||||
| @ -1,118 +0,0 @@ | |||||
| page{ |  | ||||
|   background-color: rgb(240, 239, 245);  |  | ||||
| } |  | ||||
| .page{ |  | ||||
|   background-color:#fff; |  | ||||
|   margin-bottom:30px; |  | ||||
| } |  | ||||
| 
 |  | ||||
| radio .wx-radio-input.wx-radio-input-checked{ |  | ||||
|   border: none; |  | ||||
|    background-color: #FF6347;  |  | ||||
| } |  | ||||
| radio .wx-checkbox-input.wx-checkbox-input-checked{ |  | ||||
|     background-color: #FF6347 |  | ||||
| } |  | ||||
| 
 |  | ||||
| 
 |  | ||||
| .dpxzq{ |  | ||||
|   color:#666; |  | ||||
|   background-color:rgb(240, 239, 245); |  | ||||
|   padding:3px; |  | ||||
|   border-radius:10rpx; |  | ||||
|   margin-right:10px; |  | ||||
| } |  | ||||
| .balance{ |  | ||||
|   text-align: center; |  | ||||
|   padding:10px 20px; |  | ||||
|   font-size: 18px; |  | ||||
| } |  | ||||
| .bb{ |  | ||||
|   text-align: center; |  | ||||
|   font-size: 12px; |  | ||||
| } |  | ||||
| .Withdraw{ |  | ||||
|   padding: 10px 20px; |  | ||||
| } |  | ||||
| 
 |  | ||||
| .cash{ |  | ||||
|   border: 1px solid #ddd; |  | ||||
|   flex: 1; |  | ||||
|   margin-left: -1px; |  | ||||
|   font-size: 12px; |  | ||||
|   padding: 0 10px; |  | ||||
|   line-height: 30px; |  | ||||
|   height: 30px; |  | ||||
| } |  | ||||
| 
 |  | ||||
| .tx{ |  | ||||
|   background-color: #48474c;   |  | ||||
|   color: #fff;  |  | ||||
|   text-align: center; |  | ||||
|   height: 45px; |  | ||||
|   line-height: 45px; |  | ||||
|   width: 345px; |  | ||||
|   border-radius:30px; |  | ||||
| } |  | ||||
| .Phone{ |  | ||||
|   font-size:28rpx; |  | ||||
|   width:70%; |  | ||||
|   padding-left:2%; |  | ||||
|   display:flex; |  | ||||
|   align-items:center; |  | ||||
| } |  | ||||
| 
 |  | ||||
| .section{ |  | ||||
|  padding: 12px 0; |  | ||||
|   width: 100%; |  | ||||
|   display:flex; |  | ||||
|   flex-direction:row; |  | ||||
|   font-size: 16px; |  | ||||
|   /* justify-content: center; */ |  | ||||
| } |  | ||||
| .inp{ |  | ||||
|   display:flex; |  | ||||
|   align-items:center; |  | ||||
|   width: 70%; |  | ||||
|   margin-top:2px; |  | ||||
| 
 |  | ||||
| } |  | ||||
| .t_3{ |  | ||||
|   margin-left: 15px; |  | ||||
|   font-size:13px; |  | ||||
| } |  | ||||
| .text{ |  | ||||
|   width: 27%; |  | ||||
|   text-align:center; |  | ||||
|     display:flex; |  | ||||
|   align-items:center; |  | ||||
| } |  | ||||
| .xt{ |  | ||||
|   height:1px; |  | ||||
|   width:87%; |  | ||||
|   background:#eee; |  | ||||
|   margin:auto; |  | ||||
| 
 |  | ||||
| } |  | ||||
| .sj_btn{ |  | ||||
|   background:#FF6347; |  | ||||
|   color:#fff; |  | ||||
|   font-size:26rpx; |  | ||||
| } |  | ||||
| 
 |  | ||||
| .binding-header{ height:88rpx; background: #ffffff; } |  | ||||
| .empower{ color:#353535; font-size:13px; width:50%; height:100%; display: flex; justify-content: center; align-items: center; } |  | ||||
| .binding-phone{ height:100%; width:38%; display: flex; justify-content: center; align-items: center; } |  | ||||
| .binding-main{ height:100rpx; background: #ffffff; margin-bottom: 80rpx; } |  | ||||
| .binding-main2{ height:200rpx; background: #ffffff; margin-bottom: 80rpx; } |  | ||||
| .binding-btn{ height:56rpx; margin:20rpx 40rpx 0rpx 40rpx; font-size: 13px; border-radius: 0rpx; background: #ffffff; display: flex; justify-content: center; align-items: center; } |  | ||||
| wx-button[class="binding-btn"]::after { border: 0; } |  | ||||
| .input-placeholder{ color:#c9c9c9; } |  | ||||
| .binding-btn.active{ color:#353535; } |  | ||||
| .binding-footer{ height:88rpx; background: #ff4544; border-radius: 44rpx; margin:0rpx 24rpx; display: flex; justify-content: center; align-items: center; color:#ffffff; font-size: 15px; } |  | ||||
| .binding-phone.gainPhone{ border-bottom:4rpx solid #ff4544; } |  | ||||
| .binding-phone.handPhone{ border-bottom:4rpx solid #ff4544; } |  | ||||
| .binding_pic{ height:288rpx; margin: 64rpx 0rpx 56rpx 0rpx; display: flex; justify-content: center; } |  | ||||
| .binding_num{ margin-bottom: 64rpx; } |  | ||||
| 
 |  | ||||
| 
 |  | ||||
| @ -0,0 +1,92 @@ | |||||
|  | // pages/set/password.js
 | ||||
|  | var app = getApp() | ||||
|  | var WXAPI = require('../../utils/server.js'); | ||||
|  | Page({ | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 页面的初始数据 | ||||
|  |    */ | ||||
|  |   data: { | ||||
|  | 
 | ||||
|  |   }, | ||||
|  |   confirm() { | ||||
|  |     WXAPI.updatepassword({ | ||||
|  |       accessId: app.globalData.accessId, | ||||
|  |       storeId: 239, | ||||
|  |       storeType: 1, | ||||
|  |       password: '', | ||||
|  |       newPwd: '', | ||||
|  |       confirm: '', | ||||
|  |     }).then(res => { | ||||
|  |       if (res.code == 200) { | ||||
|  |         wx.showToast({ | ||||
|  |           icon: 'loading', | ||||
|  |           title: '修改成功', | ||||
|  |           duration: 2000 | ||||
|  |         }); | ||||
|  |         wx.navigateBack() | ||||
|  |       } else { | ||||
|  |         wx.showToast({ | ||||
|  |           icon: 'loading', | ||||
|  |           title: res.message, | ||||
|  |           duration: 2000 | ||||
|  |         }); | ||||
|  |       } | ||||
|  |     }) | ||||
|  |   }, | ||||
|  |   /** | ||||
|  |    * 生命周期函数--监听页面加载 | ||||
|  |    */ | ||||
|  |   onLoad(options) { | ||||
|  | 
 | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 生命周期函数--监听页面初次渲染完成 | ||||
|  |    */ | ||||
|  |   onReady() { | ||||
|  | 
 | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 生命周期函数--监听页面显示 | ||||
|  |    */ | ||||
|  |   onShow() { | ||||
|  | 
 | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 生命周期函数--监听页面隐藏 | ||||
|  |    */ | ||||
|  |   onHide() { | ||||
|  | 
 | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 生命周期函数--监听页面卸载 | ||||
|  |    */ | ||||
|  |   onUnload() { | ||||
|  | 
 | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 页面相关事件处理函数--监听用户下拉动作 | ||||
|  |    */ | ||||
|  |   onPullDownRefresh() { | ||||
|  | 
 | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 页面上拉触底事件的处理函数 | ||||
|  |    */ | ||||
|  |   onReachBottom() { | ||||
|  | 
 | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 用户点击右上角分享 | ||||
|  |    */ | ||||
|  |   onShareAppMessage() { | ||||
|  | 
 | ||||
|  |   } | ||||
|  | }) | ||||
| @ -0,0 +1,3 @@ | |||||
|  | { | ||||
|  |   "usingComponents": {} | ||||
|  | } | ||||
| @ -0,0 +1,2 @@ | |||||
|  | <!--pages/set/password.wxml--> | ||||
|  | <text>pages/set/password.wxml</text> | ||||
| @ -0,0 +1 @@ | |||||
|  | /* pages/set/password.wxss */ | ||||
| @ -0,0 +1,94 @@ | |||||
|  | // pages/userinfo/userinfo.js
 | ||||
|  | var app = getApp() | ||||
|  | var WXAPI = require('../../utils/server.js'); | ||||
|  | Page({ | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 页面的初始数据 | ||||
|  |    */ | ||||
|  |   data: { | ||||
|  |     user: {}, | ||||
|  |     company: {}, | ||||
|  |     gender: '', | ||||
|  |   }, | ||||
|  |   requestMyData: function () { | ||||
|  |     var that = this; | ||||
|  |     WXAPI.userIndex({ | ||||
|  |       accessId: app.globalData.accessId, | ||||
|  |       storeId: 239, | ||||
|  |       storeType: 1, | ||||
|  |       mobile:'', | ||||
|  |     }).then(res => { | ||||
|  |       if (res.code == 200) { | ||||
|  |         var data = res.data; | ||||
|  | 				if (data.data) { | ||||
|  |           that.setData({ | ||||
|  |             user: data.data.user, | ||||
|  |             company: data.data.company, | ||||
|  |             gender: data.data.user.sex==0?'女':'男' | ||||
|  |           }); | ||||
|  |         }         | ||||
|  | 			} else { | ||||
|  | 				wx.showToast({ | ||||
|  | 					title: '访问失败!', | ||||
|  | 					duration: 2000 | ||||
|  | 				}); | ||||
|  |       } | ||||
|  |     }); | ||||
|  | 	}, | ||||
|  |   /** | ||||
|  |    * 生命周期函数--监听页面加载 | ||||
|  |    */ | ||||
|  |   onLoad(options) { | ||||
|  |      | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 生命周期函数--监听页面初次渲染完成 | ||||
|  |    */ | ||||
|  |   onReady() { | ||||
|  | 
 | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 生命周期函数--监听页面显示 | ||||
|  |    */ | ||||
|  |   onShow() { | ||||
|  |     this.requestMyData(); | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 生命周期函数--监听页面隐藏 | ||||
|  |    */ | ||||
|  |   onHide() { | ||||
|  | 
 | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 生命周期函数--监听页面卸载 | ||||
|  |    */ | ||||
|  |   onUnload() { | ||||
|  | 
 | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 页面相关事件处理函数--监听用户下拉动作 | ||||
|  |    */ | ||||
|  |   onPullDownRefresh() { | ||||
|  | 
 | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 页面上拉触底事件的处理函数 | ||||
|  |    */ | ||||
|  |   onReachBottom() { | ||||
|  | 
 | ||||
|  |   }, | ||||
|  | 
 | ||||
|  |   /** | ||||
|  |    * 用户点击右上角分享 | ||||
|  |    */ | ||||
|  |   onShareAppMessage() { | ||||
|  | 
 | ||||
|  |   } | ||||
|  | }) | ||||
| @ -0,0 +1,4 @@ | |||||
|  | { | ||||
|  |   "usingComponents": {}, | ||||
|  |   "navigationBarTitleText": "个人资料" | ||||
|  | } | ||||
| @ -0,0 +1,71 @@ | |||||
|  | <!--pages/userinfo/userinfo.wxml--> | ||||
|  | <view class="container"> | ||||
|  |   <!-- <view class="topbg"></view> --> | ||||
|  |   <!-- 个人资料 --> | ||||
|  |   <view class="titleModule"> | ||||
|  |     <view class="titleTag"></view> | ||||
|  |     <view class="title">个人资料</view> | ||||
|  |   </view> | ||||
|  |   <view class="viewModule"> | ||||
|  |     <view class="headModule"> | ||||
|  |       <view class="title">用户头像</view> | ||||
|  |       <image class="head_image" src="{{user.headimgurl ? user.headimgurl:'/images/heads.png'}}" bindtap="imagePreview" mode="aspectFill" /> | ||||
|  |     </view> | ||||
|  |     <view class="areaModule"> | ||||
|  |       <view class="title">昵称</view> | ||||
|  |       <text>{{user.user_name}}</text> | ||||
|  |     </view> | ||||
|  |     <view class="areaModule"> | ||||
|  |       <view class="title">性别</view> | ||||
|  |       <text>{{gender}}</text> | ||||
|  |     </view> | ||||
|  |     <view class="areaModule"> | ||||
|  |       <view class="title">手机号码</view> | ||||
|  |       <text>{{user.mobile}}</text> | ||||
|  |     </view> | ||||
|  |     <view class="areaModule"> | ||||
|  |       <view class="title">出生日期</view> | ||||
|  |       <text>{{user.birthday}}</text> | ||||
|  |     </view> | ||||
|  |   </view> | ||||
|  |   <!-- 公司资料 --> | ||||
|  |   <view class="titleModule fillcolor"> | ||||
|  |     <view class="titleTag"></view> | ||||
|  |     <view class="title">公司资料</view> | ||||
|  |   </view> | ||||
|  |   <view class="viewModule"> | ||||
|  |     <view class="areaModule"> | ||||
|  |       <view class="title">名称</view> | ||||
|  |       <text>{{company.image}}</text> | ||||
|  |     </view> | ||||
|  |     <view class="areaModule"> | ||||
|  |       <view class="title">地址</view> | ||||
|  |       <text>{{company.image}}</text> | ||||
|  |     </view> | ||||
|  |     <view class="cellModule large"> | ||||
|  |       <view class="title">营业执照</view> | ||||
|  |       <image class="cell_image" src="{{company.image}}" bindtap="imagePreview" mode="aspectFill" /> | ||||
|  |     </view> | ||||
|  |     <view class="areaModule"> | ||||
|  |       <view class="title">开户行信息</view> | ||||
|  |       <text>{{company.image}}</text> | ||||
|  |     </view> | ||||
|  |     <view class="areaModule"> | ||||
|  |       <view class="title">纳税人识别号</view> | ||||
|  |       <text>{{company.image}}</text> | ||||
|  |     </view> | ||||
|  |     <view class="areaModule"> | ||||
|  |       <view class="title">联系人(法人)</view> | ||||
|  |       <text>{{company.image}}</text> | ||||
|  |     </view> | ||||
|  |     <view class="areaModule"> | ||||
|  |       <view class="title">联系方式</view> | ||||
|  |       <text>{{company.image}}</text> | ||||
|  |     </view> | ||||
|  |   </view> | ||||
|  | 
 | ||||
|  |   <view class="submitView"> | ||||
|  |     <!-- <view class="submitBtn" bindtap="submitAct">接单</view> --> | ||||
|  |   </view> | ||||
|  | 
 | ||||
|  | </view> | ||||
| @ -0,0 +1,166 @@ | |||||
|  | /* pages/userinfo/userinfo.wxss */ | ||||
|  | page{ | ||||
|  |   background-color: #F6F6FB; | ||||
|  | } | ||||
|  | .container{ | ||||
|  |   font-size: 30rpx; | ||||
|  |   /* height: 100vh; | ||||
|  |   overflow-x: hidden;  | ||||
|  |   overflow-y: auto; */ | ||||
|  | } | ||||
|  | .topbg { | ||||
|  |   position: absolute; | ||||
|  |   top: 0; | ||||
|  |   left: 0; | ||||
|  |   height: 90rpx; | ||||
|  |   width: 100%; | ||||
|  |   z-index: -1; | ||||
|  |   background: linear-gradient(to top, #F6F6FA, #C0DEFA); | ||||
|  | } | ||||
|  | .titleModule{ | ||||
|  |   display: flex; | ||||
|  |   flex-direction: row; | ||||
|  |   height: 90rpx; | ||||
|  | } | ||||
|  | .titleModule .titleTag{ | ||||
|  |   margin-left: 30rpx; | ||||
|  |   margin-top: 31rpx; | ||||
|  |   height: 28rpx; | ||||
|  |   width: 8rpx; | ||||
|  |   background-color: #DF1111; | ||||
|  | } | ||||
|  | .titleModule .title{ | ||||
|  |   margin-left: 10rpx; | ||||
|  |   height: 90rpx; | ||||
|  |   font-size: 32rpx; | ||||
|  |   line-height: 90rpx; | ||||
|  |   color: #333333; | ||||
|  | } | ||||
|  | .fillcolor{ | ||||
|  |   background-color: #F6F6FB; | ||||
|  | } | ||||
|  | .headModule{ | ||||
|  |   display: flex; | ||||
|  |   flex-direction: row; | ||||
|  |   height: 180rpx; | ||||
|  |   background-color: white; | ||||
|  |   border-bottom: 1rpx solid #ececec; | ||||
|  | } | ||||
|  | .headModule .title{ | ||||
|  |   margin-left: 30rpx; | ||||
|  |   font-size: 28rpx; | ||||
|  |   width: 180rpx; | ||||
|  |   height: 90rpx; | ||||
|  |   line-height: 90rpx; | ||||
|  |   color: #333333; | ||||
|  | } | ||||
|  | .headModule .head_image { | ||||
|  |   margin-top: 30rpx; | ||||
|  |   margin-left: 60rpx; | ||||
|  |   width: 120rpx; | ||||
|  |   height: 120rpx; | ||||
|  |   border-radius: 50%; | ||||
|  | } | ||||
|  | .cellModule{ | ||||
|  |   display: flex; | ||||
|  |   flex-direction: row; | ||||
|  |   height: 90rpx; | ||||
|  |   background-color: white; | ||||
|  |   border-bottom: 1rpx solid #ececec; | ||||
|  | } | ||||
|  | .cellModule .title{ | ||||
|  |   margin-left: 30rpx; | ||||
|  |   font-size: 28rpx; | ||||
|  |   width: 180rpx; | ||||
|  |   height: 90rpx; | ||||
|  |   line-height: 90rpx; | ||||
|  |   color: #333333; | ||||
|  | } | ||||
|  | .large{ | ||||
|  |   height: 220rpx; | ||||
|  | } | ||||
|  | .cellModule .scrollView{ | ||||
|  |   margin-top: 30rpx; | ||||
|  |   margin-left: 80rpx; | ||||
|  |   width: 500rpx; | ||||
|  |   height: 160rpx; | ||||
|  |   white-space: nowrap; | ||||
|  |   display: inline-block; | ||||
|  | } | ||||
|  | .cellModule .cell_image { | ||||
|  |   margin-top: 30rpx; | ||||
|  |   margin-left: 60rpx; | ||||
|  |   width: 160rpx; | ||||
|  |   height: 160rpx; | ||||
|  | } | ||||
|  | .areaModule{ | ||||
|  |   display: flex; | ||||
|  |   flex-direction: row; | ||||
|  |   min-height: 90rpx; | ||||
|  |   background-color: white; | ||||
|  |   border-bottom: 1rpx solid #ececec; | ||||
|  | } | ||||
|  | .areaModule .title{ | ||||
|  |   margin-left: 30rpx; | ||||
|  |   font-size: 28rpx; | ||||
|  |   width: 180rpx; | ||||
|  |   height: 90rpx; | ||||
|  |   line-height: 90rpx; | ||||
|  |   color: #333333; | ||||
|  | } | ||||
|  | .areaModule text{ | ||||
|  |   padding-top: 25rpx; | ||||
|  |   margin-left: 60rpx; | ||||
|  |   padding-bottom: 25rpx; | ||||
|  |   width: 435rpx; | ||||
|  |   font-size: 28rpx; | ||||
|  |   color: #807e7e; | ||||
|  | } | ||||
|  | .submitView{ | ||||
|  |   margin-top: 40rpx; | ||||
|  |   height: 80rpx; | ||||
|  |   background-color: #F6F6FB; | ||||
|  |   display: flex; | ||||
|  |   flex-direction: row; | ||||
|  |   /* iPhoneX底部适配 */ | ||||
|  |   padding-bottom: env(safe-area-inset-bottom); | ||||
|  | } | ||||
|  | .submitView .sendBtn{ | ||||
|  |   margin-top: 5rpx; | ||||
|  |   margin-left: 30rpx; | ||||
|  |   height: 70rpx; | ||||
|  |   width: 330rpx; | ||||
|  |   text-align: center; | ||||
|  |   line-height: 70rpx; | ||||
|  |   font-size: 28rpx; | ||||
|  |   color: #1A66FF; | ||||
|  |   background-color: #E7EEFE; | ||||
|  |   border-radius: 8rpx; | ||||
|  | } | ||||
|  | /* .submitView .submitBtn{ | ||||
|  |   margin-top: 5rpx; | ||||
|  |   margin-left: 30rpx; | ||||
|  |   height: 70rpx; | ||||
|  |   width: 330rpx; | ||||
|  |   text-align: center; | ||||
|  |   line-height: 70rpx; | ||||
|  |   font-size: 28rpx; | ||||
|  |   color: white; | ||||
|  |   background-color: #1A66FF; | ||||
|  |   border-radius: 8rpx; | ||||
|  | } */ | ||||
|  | .submitView .submitBtn{ | ||||
|  |   margin-top: 5rpx; | ||||
|  |   margin-left: 60rpx; | ||||
|  |   display: flex; | ||||
|  |   align-items: center; | ||||
|  |   justify-content: center; | ||||
|  |   height: 70rpx; | ||||
|  |   width: 630rpx; | ||||
|  |   text-align: center; | ||||
|  |   line-height: 70rpx; | ||||
|  |   font-size: 28rpx; | ||||
|  |   color: white; | ||||
|  |   background-color: #1A66FF; | ||||
|  |   border-radius: 35rpx; | ||||
|  | } | ||||