邹能昇 2 сар өмнө
parent
commit
7c58b1d8c3

+ 8 - 0
nova-werun/pages/my/my-profile/index.js

@@ -26,6 +26,7 @@ Page({
         sex: '男',
         nickname: null,
         height: null,
+        idnumber:null,//身份证号码
         //  选择部门
         // mainActiveIndex: 0,
         // activeId: null,
@@ -572,5 +573,12 @@ Page({
             // 这里可以提示用户手机号格式不正确
         }
         console.log(this.data.phone);
+    },
+    changeidnumber(e){
+        const idnumber = e.detail;
+        this.setData({
+            idnumber,
+        })
+        console.log(idnumber);
     }
 })

+ 1 - 0
nova-werun/pages/my/my-profile/index.wxml

@@ -12,6 +12,7 @@
     </view>
     <van-field value="{{ nickname }}" required clearable label="昵称" maxlength="8" placeholder="请输入昵称" bind:change="changenickname"  wx:if="{{title=='完善资料'}}" />
     <van-field value="{{ name }}" required clearable label="姓名" maxlength="8" placeholder="请输入姓名" bind:change="changename"  wx:if="{{title=='资料认证'}}" />
+    <van-field value="{{ idnumber }}"  clearable label="身份证" maxlength="18" placeholder="请输入身份证号码" bind:change="changeidnumber"  wx:if="{{title=='资料认证'}}" />
     <van-field class="field" required model:value="{{ sex }}" readonly maxlength="1" label="性别" bind:tap="showSelect" wx:if="{{title=='资料认证'}}" />
     <van-field value="{{ phone }}" required clearable label="电话" maxlength="11" placeholder="请输入电话" bind:blur="changephone"  wx:if="{{title=='资料认证'}}" />
     <van-field value="{{ height }}" required clearable label="身高" type="number" placeholder="请输入身高(例如:170)" bind:blur="getHeight" bind:clear='clearHeight' wx:if="{{title=='资料认证'}}" />