LiFei пре 6 година
родитељ
комит
c9d437b96a
2 измењених фајлова са 3 додато и 2 уклоњено
  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) {
     this.setData({
+      userInfo: app.globalData.userInfo,
       phone: updataStorageData("phone"),
       hpUser: wx.getStorageSync("hpuser")
     })

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

@@ -1,7 +1,7 @@
 <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>
-  <text class='changetx'>点击修改头像</text>
+  <text class='changetx'></text>
 </view>
 
 <view class='user'>