Browse Source

修改身份证号码只填后6位

shibei
luyan 1 year ago
parent
commit
07603d27ae
  1. 7
      miniprogram/pages/forgotPwd/forgotPwd.js
  2. 4
      miniprogram/pages/forgotPwd/forgotPwd.wxml
  3. 27
      miniprogram/pages/formid/formid.js
  4. 4
      miniprogram/pages/formid/formid.wxml
  5. 8
      miniprogram/pages/login/login.wxml
  6. 4
      miniprogram/utils/config.js

7
miniprogram/pages/forgotPwd/forgotPwd.js

@ -93,15 +93,14 @@ Page({
submit(){
if(!this.data.form.identityNo){
wx.showToast({
title: '请输入身份证号码',
title: '请输入身份证号码后6位',
icon:'none'
})
return false
}
console.log(this.data.form.identityNo.length);
if(this.data.form.identityNo.length !== 18){
if(this.data.form.identityNo.length !== 6){
wx.showToast({
title: '身份证号码错误,请确认身份证号码',
title: '请确认身份证号码后6位',
icon:'none'
})
return false

4
miniprogram/pages/forgotPwd/forgotPwd.wxml

@ -3,11 +3,11 @@
<view class="list-item ">
<view class="left">
<text class="must">*</text>
<view class="title">身份证号码</view>
<view class="title">身份证尾号(后6位)</view>
</view>
<view class="right" readonly>
<input confirm-type="next"
bindblur="bindIdentityNo" bindinput="bindIdentityNo" value="{{form.identityNo}}" placeholder-class="placeholder-style" placeholder="请输入身份证号" />
bindblur="bindIdentityNo" bindinput="bindIdentityNo" value="{{form.identityNo}}" placeholder-class="placeholder-style" placeholder="请输入身份证号" />
</view>
</view>
<view class="list-item ">

27
miniprogram/pages/formid/formid.js

@ -191,13 +191,16 @@ Page({
delete obj[key];
}
}
if (obj.identityNo.length == 18) {
this.idNo = obj.identityNo;
let temp = '*********';
let str = obj.identityNo.slice(0, 4);
let end = obj.identityNo.slice(15, 18);
obj.identityNo = str + temp + end;
if(null != obj.identityNo && obj.identityNo != ''){
this.data.form.identityNo = obj.identityNo
}
// if (obj.identityNo.length == 18) {
// this.idNo = obj.identityNo;
// let temp = '*********';
// let str = obj.identityNo.slice(0, 4);
// let end = obj.identityNo.slice(15, 18);
// obj.identityNo = str + temp + end;
// }
let region = ''
if(obj.villageName != ''){
if(obj.villageName.indexOf('-') > 1){
@ -384,7 +387,6 @@ Page({
newArr: this.data.newArr,
changeFlag: true
})
console.log(this.data.newArr);
},
//滑动社区
bindMultiPickerColumnChangeC(e) {
@ -587,7 +589,6 @@ Page({
// gridId: '1224104693058306049',
wxCode: res.code
}
console.log(wxCode);
api.getTokenV3(para).then(function (res) {
global.Token = res.data.token
wx.removeStorageSync('token')
@ -635,9 +636,9 @@ Page({
this.showToast('请填写身份证号码')
return false
}
this.data.form.identityNo = this.idNo
if (this.data.form.identityNo.length != 18) {
this.showToast('请填写正确的身份证号码')
// this.data.form.identityNo = this.idNo
if (this.data.form.identityNo.length != 6) {
this.showToast('请输入身份证号码后6位')
return false
}else {
this.data.form.identityNo = this.idNo;
@ -759,8 +760,8 @@ Page({
this.showToast('请输入姓名')
return
}
if (!this.data.form.identityNo && this.data.form.identityNo.length == 18) {
this.showToast('请填写正确的身份证号码')
if (!this.data.form.identityNo && this.data.form.identityNo.length == 6) {
this.showToast('请输入身份证号码后6位')
return
}
if (!this.data.form.workIndustry) {

4
miniprogram/pages/formid/formid.wxml

@ -12,10 +12,10 @@
<view class="list-item ">
<view class="left">
<text class="must">*</text>
<view class="title">身份证号</view>
<view class="title">身份证(后6位)</view>
</view>
<view class="right">
<input confirm-type="next" bindblur="bindRealidentityNoInput" bindinput="bindRealidentityNoInput" value="{{form.identityNo}}" placeholder-class="placeholder-style" placeholder="请输入身份证号" />
<input confirm-type="next" bindblur="bindRealidentityNoInput" bindinput="bindRealidentityNoInput" value="{{form.identityNo}}" placeholder-class="placeholder-style" placeholder="请输入身份证号" />
</view>
</view>
<view class="list-item ">

8
miniprogram/pages/login/login.wxml

@ -6,7 +6,7 @@
<view class="info-bg">
<view class="name">
<view class="info-input">
<input bindinput="getmobile" placeholder="请输入手机号码或身份证号码" value="{{mobile}}"></input>
<input bindinput="getmobile" placeholder="请输入手机号码" value="{{mobile}}"></input>
</view>
</view>
<view class="password">
@ -15,9 +15,9 @@
</view>
</view>
<view class="login" bind:tap="handleLogin">登 录</view>
<view>
<view style="color: #f72f3f;font-size: 28rpx;margin-left: 150rpx;cursor: pointer;margin-top: 25rpx;" bind:tap="toRegister">去注册</view>
<view style="color: #f72f3f;font-size: 28rpx;margin-left: 400rpx; cursor: pointer;margin-top: -40rpx;" bind:tap="forgotPwd">忘记密码</view>
<view style="display: flex;">
<view style="color: #f72f3f;font-size: 28rpx;width: 50%;text-align: center;margin-top: 25rpx;" bind:tap="toRegister">去注册</view>
<view style="color: #f72f3f;font-size: 28rpx;width: 50%;text-align: center;margin-top: 25rpx;" bind:tap="forgotPwd">忘记密码</view>
</view>
</view>
</view>

4
miniprogram/utils/config.js

@ -8,8 +8,8 @@ module.exports = {
// 现在小程序的功能 主要走咱这边自己的接口,另外 党群服务中心、需求清单、问卷调查走产品的接口,所以导致接口半路径不同
function BASEURL() {
// return "https://epdc-shibei.elinkservice.cn/epdc-api/api/" // 正式环境
return "http://localhost:10994/epdc-api/api/"
return "https://epdc-shibei.elinkservice.cn/epdc-api/api/" // 正式环境
// return "http://localhost:10994/epdc-api/api/"
}
// 获取 党群服务中心、需求清单、问卷调查 等模块的半路径
function getProductionBaseUrl () {

Loading…
Cancel
Save