Explorar o código

修改个人信息页面

LiFei %!s(int64=6) %!d(string=hai) anos
pai
achega
c9d437b96a
Modificáronse 2 ficheiros con 3 adicións e 2 borrados
  1. 1 0
      pages/user-form/index.js
  2. 2 2
      pages/user-form/index.wxml

+ 1 - 0
pages/user-form/index.js

@@ -28,6 +28,7 @@ Page({
   },
   },
   onLoad: function(options) {
   onLoad: function(options) {
     this.setData({
     this.setData({
+      userInfo: app.globalData.userInfo,
       phone: updataStorageData("phone"),
       phone: updataStorageData("phone"),
       hpUser: wx.getStorageSync("hpuser")
       hpUser: wx.getStorageSync("hpuser")
     })
     })

+ 2 - 2
pages/user-form/index.wxml

@@ -1,7 +1,7 @@
 <view class='db'>
 <view class='db'>
-   <image wx:if='{{headImgUrl}}' src='{{headImgUrl}}'></image>
+   <image wx:if='{{userInfo.avatarUrl}}' src='{{userInfo.avatarUrl}}'></image>
   <image wx:else src='{{imgServerUrl}}/images/happyjob/msyq.png'></image>
   <image wx:else src='{{imgServerUrl}}/images/happyjob/msyq.png'></image>
-  <text class='changetx'>点击修改头像</text>
+  <text class='changetx'></text>
 </view>
 </view>
 
 
 <view class='user'>
 <view class='user'>