index.wxml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <wxs src="../../utils/filter.wxs" module="filters" />
  2. <view class="editBox">
  3. <button class="resetBtn editRow" open-type="chooseAvatar" bind:chooseavatar="changeAvatar">
  4. <view class="name">头像</view>
  5. <view class="right">
  6. <image class='avatar' src='{{ userInfo.avatar}}'></image>
  7. <image class='black' src='/static/black.png'></image>
  8. </view>
  9. </button>
  10. <view class="editRow">
  11. <view class="name">昵称</view>
  12. <view class="right">
  13. <input name='nickName' type="nickname" placeholder="请输入昵称" class='nickName' maxlength="9"
  14. value='{{userInfo.nickName}}' bindblur='saveNickName'></input>
  15. <image class='black' src='/static/black.png'></image>
  16. </view>
  17. </view>
  18. <view class="editRow" bindtap="selectGender">
  19. <view class="name">性别</view>
  20. <view class="right">
  21. <view class="name">
  22. {{userInfo.gender===0?'女':'男'}}
  23. </view>
  24. <image class='black' src='/static/black.png'></image>
  25. </view>
  26. </view>
  27. <view class="editRow">
  28. <view class="name">生日</view>
  29. <view class="right">
  30. <picker mode="date" value="{{filters.formatDate( userInfo.birthday, 2) }}" bindchange="bindDateChange"
  31. end="2022-01-01">
  32. <view class="name">{{userInfo.birthday?filters.formatDate(userInfo.birthday,2):'请选择生日' }}</view>
  33. </picker>
  34. <image class='black' src='/static/black.png'></image>
  35. </view>
  36. </view>
  37. <view class="editRow mt40" bindtap="selectProfession">
  38. <view class="name">身份</view>
  39. <view class="right">
  40. <view class="name">
  41. {{userInfo.profession}}
  42. </view>
  43. <image class='black' src='/static/black.png'></image>
  44. </view>
  45. </view>
  46. <view class="editRow">
  47. <view class="name">年级</view>
  48. <view class="right">
  49. <picker value="{{gradeIndex}}" range="{{gradeArray}}" range-key="key" bindchange="bindGradeChange">
  50. <view class="name">
  51. {{filters.gradeFilter(userInfo.grade)}}
  52. </view>
  53. </picker>
  54. <image class='black' src='/static/black.png'></image>
  55. </view>
  56. </view>
  57. <view class="editRow">
  58. <view class="name">学校</view>
  59. <view class="right">
  60. <input placeholder="请输入学校" class='nickName' maxlength="18" value='{{userInfo.schoolName}}'
  61. bindblur='saveSchool'></input>
  62. <image class='black' src='/static/black.png'></image>
  63. </view>
  64. </view>
  65. <view class="editRow">
  66. <view class="name">手机号</view>
  67. <view class="right" wx:if="{{!userInfo.mobile}}">
  68. <button class="resetBtn" style="font-size: 30rpx;" open-type="getPhoneNumber"
  69. bindgetphonenumber="getPhoneNumber">立即绑定</button>
  70. <image class='black' src='/static/black.png'></image>
  71. </view>
  72. <view class="right" wx:if="{{userInfo.mobile}}">
  73. {{userInfo.mobile}}
  74. </view>
  75. </view>
  76. <!-- <view class="switchAccount mt40">
  77. 切换账号
  78. </view> -->
  79. </view>