user-edit.wxml 2.0 KB

12345678910111213141516171819202122232425262728293031323334
  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 mut-bind:submit="onSubmit" bindinput="onFormInput">
  6. <form-fix _loading="{{dirty}}" delay="200">
  7. <!-- <t-cell t-class="cell-border-gradient" title="手机号" note="{{model['phone']}}" /> -->
  8. <t-cell title="姓名">
  9. <input class="cell-field__inner" slot="note" name="name" value="{{model['name']}}" type="text" placeholder="请输入姓名" confirm-type="next" />
  10. </t-cell>
  11. <view class="cell-row">
  12. <view class="label">身份证号</view>
  13. <input class="input" name="cardno" value="{{model['cardno']}}" type="idcard" placeholder="请输入身份证号" confirm-type="next" data-field="cardno" bindinput="onFormInput" maxlength="18" />
  14. </view>
  15. <block wx:if="{{!idCardValid}}">
  16. <t-cell title="年龄" required>
  17. <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%" />
  18. <view class="cell-field__suffix" slot="note">岁</view>
  19. </t-cell>
  20. <t-cell title="性别" required>
  21. <field-radio slot="note" name="sex" value="{{model['sex']}}" options="{{dictionary.options($dictionaries, 'sys_user_sex')}}" bind:change="onSexChange" />
  22. </t-cell>
  23. </block>
  24. <block wx:else>
  25. <t-cell title="年龄" note="{{model['age']}}岁" required />
  26. <t-cell title="性别" note="{{dictionary.label($dictionaries, 'sys_user_sex', model['sex'])}}" required />
  27. </block>
  28. <user-data-edit model="{{model}}" dirty="{{dirty}}"></user-data-edit>
  29. <form-button block index="1" loading="{{dirty}}" auto="{{true}}"></form-button>
  30. </form-fix>
  31. </form>
  32. </scroll-view>
  33. <t-message id="{{$messageId}}" />