index.wxml 2.8 KB

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