index.wxml 3.5 KB

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