user.wxml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <view>
  2. <auth bindlogin="loginSuccess" />
  3. <view class="photo">
  4. <button class="userinfo-avatar" open-type="chooseAvatar" bind:chooseavatar="selectPhoto">
  5. <!-- <view bindtap="selectPhoto" style="background-image: url({{avatar}})"> -->
  6. <view style="background-image: url({{avatar }})">
  7. </view>
  8. </button>
  9. <text class="userinfo-nickname">点击修改头像</text>
  10. <!-- {{userInfo.nickName}} -->
  11. </view>
  12. <view class="info">
  13. <view class="item">
  14. <text>用户昵称</text>
  15. <view class="ir">
  16. <input type="nickname" value="{{nickname}}" class="ipname" bindinput="updateNickName"></input>
  17. </view>
  18. </view>
  19. <view class="item">
  20. <text>性别</text>
  21. <view class="ir radio">
  22. <view class="checkbox" bindtap="updateSex" data-sex="{{1}}">
  23. <image src="{{gender === 1 ? '/static/images/icon-normal_checkbox-checked.png' :'/static/images/icon-normal_checkbox.png' }}"></image>
  24. </view>
  25. <view class="checkbox" bindtap="updateSex" data-sex="{{0}}">
  26. <image src="{{gender === 0 ? '/static/images/icon-normal_checkbox-checked.png' :'/static/images/icon-normal_checkbox.png' }}"></image>
  27. </view>
  28. </view>
  29. </view>
  30. <view class="item">
  31. <text>生日</text>
  32. <view class="ir">
  33. <picker bindchange="bindDateChange" mode="date" value="{{birthday}}">
  34. <view class="picker-date">
  35. {{birthday ? birthday : ''}}
  36. <image src="/static/images/go.png"></image>
  37. </view>
  38. </picker>
  39. </view>
  40. </view>
  41. <view class="item">
  42. <text>城市</text>
  43. <view class="ir">
  44. <picker bindchange="bindRegionChange" mode="region" value="{{region}}">
  45. <view class="picker-date">
  46. <block wx:if="{{region.length}}">
  47. {{region[0]}},{{region[1]}},{{region[2]}}
  48. </block>
  49. <image src="/static/images/go.png"></image>
  50. </view>
  51. </picker>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="save">
  56. <button bindtap="save">保存</button>
  57. </view>
  58. </view>