正在显示
4 个修改的文件
包含
36 行增加
和
4 行删除
| @@ -157,10 +157,20 @@ Page({ | @@ -157,10 +157,20 @@ Page({ | ||
| 157 | if (this.data.cardtype.length < 1) { | 157 | if (this.data.cardtype.length < 1) { |
| 158 | this.showToast("请选择证照类型") | 158 | this.showToast("请选择证照类型") |
| 159 | return; | 159 | return; |
| 160 | - } else if (!formdata.id_card_no || formdata.id_card_no.length < 1) { | 160 | + } |
| 161 | + if (!formdata.id_card_no || formdata.id_card_no.length < 1) { | ||
| 161 | this.showToast("请输入证件号码") | 162 | this.showToast("请输入证件号码") |
| 162 | return; | 163 | return; |
| 163 | - } else if (this.data.cardtype == '居民身份证' && !format.isIDCardNum(formdata.id_card_no)) { | 164 | + } |
| 165 | + if (this.data.cardtype == '居民身份证' && !format.isIDCardNum(formdata.id_card_no)) { | ||
| 166 | + this.showToast("证件号码有误") | ||
| 167 | + return; | ||
| 168 | + } | ||
| 169 | + if (this.data.cardtype == '中国护照' && formdata.id_card_no.length!=9) { | ||
| 170 | + this.showToast("证件号码有误") | ||
| 171 | + return; | ||
| 172 | + } | ||
| 173 | + if ((this.data.cardtype.indexOf('港澳') != -1 || this.data.cardtype.indexOf('台湾') != -1) &&! /^\d{18}$/.test(formdata.id_card_no)) { | ||
| 164 | this.showToast("证件号码有误") | 174 | this.showToast("证件号码有误") |
| 165 | return; | 175 | return; |
| 166 | } | 176 | } |
| @@ -28,7 +28,7 @@ | @@ -28,7 +28,7 @@ | ||
| 28 | <input class='input_wrap01 float_right' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='id_card_no' maxlength='18' type='idcard' value='{{id_card_no}}' bindinput="bindinput"></input> | 28 | <input class='input_wrap01 float_right' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='id_card_no' maxlength='18' type='idcard' value='{{id_card_no}}' bindinput="bindinput"></input> |
| 29 | </view> | 29 | </view> |
| 30 | <view wx:else> | 30 | <view wx:else> |
| 31 | - <input class='input_wrap01 float_right' placeholder='请输入证件号码' placeholder-class='text_999_30' name='id_card_no' maxlength='24' value='{{id_card_no}}' bindinput="bindinput"></input> | 31 | + <input class='input_wrap01 float_right' placeholder='请输入证件号码' placeholder-class='text_999_30' name='id_card_no' maxlength='20' value='{{id_card_no}}' bindinput="bindinput"></input> |
| 32 | </view> | 32 | </view> |
| 33 | </view> | 33 | </view> |
| 34 | <view style="margin:0 30rpx;background:#e5e5e5;height:2rpx;"></view> | 34 | <view style="margin:0 30rpx;background:#e5e5e5;height:2rpx;"></view> |
| @@ -120,6 +120,26 @@ Page({ | @@ -120,6 +120,26 @@ Page({ | ||
| 120 | }) | 120 | }) |
| 121 | }, | 121 | }, |
| 122 | 122 | ||
| 123 | + loginout:function(){ | ||
| 124 | + wx.showModal({ | ||
| 125 | + title: '退出登录', | ||
| 126 | + content: '确认要退出登录吗?', | ||
| 127 | + confirmText: '确定', | ||
| 128 | + showCancel: true, | ||
| 129 | + cancelText:"取消", | ||
| 130 | + confirmColor: '#357aeb', | ||
| 131 | + success(res) { | ||
| 132 | + console.log("loginout", res) | ||
| 133 | + if (res.confirm) { | ||
| 134 | + wx.reLaunch({ | ||
| 135 | + // url: '../../login/login' | ||
| 136 | + url: '../../getPhone/getPhone' | ||
| 137 | + }) | ||
| 138 | + } | ||
| 139 | + } | ||
| 140 | + }) | ||
| 141 | + }, | ||
| 142 | + | ||
| 123 | /** | 143 | /** |
| 124 | * 生命周期函数--监听页面隐藏 | 144 | * 生命周期函数--监听页面隐藏 |
| 125 | */ | 145 | */ |
| @@ -55,9 +55,11 @@ | @@ -55,9 +55,11 @@ | ||
| 55 | </view> | 55 | </view> |
| 56 | <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> | 56 | <image class='arrow_wrap float_right' src='/images/arrow_right.png'></image> |
| 57 | </view> --> | 57 | </view> --> |
| 58 | + | ||
| 59 | + <text style="font-size:34rpx;color:#999;text-align:center;padding:20rpx;margin:80rpx 0" bindtap='loginout'>退出登录</text> | ||
| 58 | </view> | 60 | </view> |
| 59 | </scroll-view> | 61 | </scroll-view> |
| 60 | - | 62 | + |
| 61 | <image class='chat-img' bindtap='gochat' src='/images/icon_chat.png'></image> | 63 | <image class='chat-img' bindtap='gochat' src='/images/icon_chat.png'></image> |
| 62 | 64 | ||
| 63 | </view> | 65 | </view> |
请
注册
或
登录
后发表评论