user-edit.wxml 1.9 KB

123456789101112131415161718192021222324252627282930313233
  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. <view class="cell-row">
  11. <view class="label">身份证号</view>
  12. <input class="input" name="cardno" value="{{model['cardno']}}" type="idcard" placeholder="请输入身份证号" confirm-type="next" data-field="cardno" bindinput="onFormInput" maxlength="18" />
  13. </view>
  14. <block wx:if="{{!idCardValid}}">
  15. <t-cell title="年龄" required>
  16. <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%" />
  17. <view class="cell-field__suffix" slot="note">岁</view>
  18. </t-cell>
  19. <t-cell title="性别" required>
  20. <field-radio slot="note" name="sex" value="{{model['sex']}}" options="{{dictionary.options($dictionaries, 'sys_user_sex')}}" catch:change="onSexChange" />
  21. </t-cell>
  22. </block>
  23. <block wx:else>
  24. <t-cell title="年龄" note="{{model['age']}}岁" required />
  25. <t-cell title="性别" note="{{dictionary.label($dictionaries, 'sys_user_sex', model['sex'])}}" required />
  26. </block>
  27. <user-data-edit model="{{model}}" dirty="{{dirty}}"></user-data-edit>
  28. <form-button block index="1" id="submitBtn"></form-button>
  29. </form>
  30. </scroll-view>
  31. <t-message id="{{$messageId}}" />