user-edit.wxml 1.8 KB

1234567891011121314151617181920212223242526272829303132
  1. <!--module/user/pages/user-edit/user-edit.wxml-->
  2. <wxs src="../../../../core/wxs/dictionary.wxs" module="dictionary" />
  3. <t-navbar title="完善信息" left-arrow />
  4. <scroll-view class="page-scroll__container" type="list" scroll-y style="{{containerStyle}}">
  5. <form bindsubmit="onSubmit" bindinput="onFormInput">
  6. <!-- <t-cell t-class="cell-border-gradient" title="手机号" note="{{model['phone']}}" /> -->
  7. <t-cell title="姓名">
  8. <input class="cell-field__inner" slot="note" name="name" value="{{model['name']}}" type="text" placeholder="请输入姓名" confirm-type="next" />
  9. </t-cell>
  10. <t-cell title="身份证号">
  11. <input class="cell-field__inner" slot="note" name="cardno" value="{{model['cardno']}}" type="idcard" placeholder="请输入身份证号" confirm-type="next" data-field="cardno" bindinput="onFormInput" />
  12. </t-cell>
  13. <block wx:if="{{!idCardValid}}">
  14. <t-cell title="年龄" required>
  15. <input class="cell-field__inner" slot="note" name="age" value="{{model['age']}}" type="number" placeholder="请输入年龄" confirm-type="next" data-field="age" bindinput="onFormInput" style="padding-right:12%" />
  16. <view class="cell-field__suffix" slot="note">岁</view>
  17. </t-cell>
  18. <t-cell title="性别" required>
  19. <field-radio slot="note" name="sex" value="{{model['sex']}}" options="{{dictionary.options($dictionaries, 'sys_user_sex')}}" catch:change="onSexChange" />
  20. </t-cell>
  21. </block>
  22. <block wx:else>
  23. <t-cell title="年龄" note="{{model['age']}}岁" required />
  24. <t-cell title="性别" note="{{dictionary.label($dictionaries, 'sys_user_sex', model['sex'])}}" required />
  25. </block>
  26. <user-data-edit model="{{model}}" dirty="{{dirty}}"></user-data-edit>
  27. <form-button block index="1" id="submitBtn"></form-button>
  28. </form>
  29. </scroll-view>
  30. <t-message id="{{$messageId}}" />