提交 3b1756120cbfa4b7def82c363c2e1d7ac611b794

作者 pangy
2 个父辈 9fe9e054 6fe79e69

Merge branch 'dev_py' into dev2.0

... ... @@ -639,6 +639,7 @@ Page({
639 639 if (res.data.items && res.data.items[0]) {
640 640 var hasLoverData = that.data.hasLoverData
641 641 hasLoverData.selected = '是'
  642 + hasLoverData.disabled = true
642 643 var data = res.data.items[0], setData = { hasLover: true, hasLoverData: hasLoverData}
643 644 if (data.name && data.name.length) {
644 645 setData.spouse_name = data.name
... ... @@ -722,6 +723,7 @@ Page({
722 723
723 724 var hasLoverData = this.data.hasLoverData
724 725 hasLoverData.selected = data.has_spouse == 'y' ? '是' : '否'
  726 + hasLoverData.disabled = data.has_spouse == 'y' ? true : false
725 727 setData.hasLover = data.has_spouse == 'y' ? true : false
726 728 setData.hasLoverData = hasLoverData
727 729 if (data.spouse_name && data.spouse_name.length) {
... ...
... ... @@ -340,7 +340,7 @@
340 340 <view class='divide_line_30'></view>
341 341 <view style='height:90rpx'>
342 342 <text class='text_777_30 float_left head_in'>配偶姓名</text>
343   - <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入配偶姓名' name='spouse_name' value='{{spouse_name}}'></input>
  343 + <input class='input_wrap' placeholder-class='text_999_30 float_right' style='line-height: 90rpx;text-align: right;color:#000;' placeholder='请输入配偶姓名' name='spouse_name' value='{{spouse_name}}' disabled='{{hasLover}}'></input>
344 344 </view>
345 345 <view class='divide_line_30'></view>
346 346 <template is="picker_cell_normal" data="{{...lovercardtypeData}}" />
... ... @@ -349,7 +349,7 @@
349 349 <text class='text_777_30 float_left head_in'>配偶证照号码</text>
350 350 <view wx:if="{{isIdCard}}">
351 351 <image class='image_camera float_right' src='/images/camera.png' bindtap='getIdInfo' id="spouse_id_card_no"></image>
352   - <input class='input_wrap' style='color:#000;' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='spouse_id_card_no' maxlength='18' type='idcard' value='{{spouse_id_card_no}}' bindinput="idChange" id='spouse_id_card_no_input'></input>
  352 + <input class='input_wrap' style='color:#000;' placeholder='请输入或拍摄身份证' placeholder-class='text_999_30' name='spouse_id_card_no' maxlength='18' type='idcard' value='{{spouse_id_card_no}}' bindinput="idChange" id='spouse_id_card_no_input' disabled='{{hasLover}}'></input>
353 353 </view>
354 354 </view>
355 355 <view class='divide_line_30'></view>
... ...
... ... @@ -887,10 +887,14 @@ Page({
887 887 this.showtoast('手机号码有误');
888 888 return
889 889 }
890   - if (formdata.email && formdata.email.length > 0 && !regEmail.test(formdata.email)) {
891   - this.showtoast('邮箱格式有误');
892   - return
893   - }
  890 + // if (formdata.email && formdata.email.length > 0 && !regEmail.test(formdata.email)) {
  891 + // this.showtoast('邮箱格式有误');
  892 + // return
  893 + // }
  894 + // if (formdata.email && formdata.email.length > 0 && !format.checkEmail(formdata.email)) {
  895 + // this.showtoast('邮箱格式有误');
  896 + // return
  897 + // }
894 898 if (formdata.bank_account && formdata.bank_account.length > 0 && !format.banknoCheck(formdata.bank_account)) {
895 899 wx.showToast({
896 900 title: '银行卡号格式有误',
... ... @@ -1016,11 +1020,10 @@ Page({
1016 1020 // ({
1017 1021 // url: '../home/home',
1018 1022 // })
1019   - } else {
1020   - wx.showModal({
1021   - title: res.data.message,
1022   - content: '',
1023   - })
  1023 + } else if (res.data.code == 400){
  1024 + if (res.data.errors.email){
  1025 + that.showtoast('邮箱格式有误')
  1026 + }
1024 1027 }
1025 1028 },
1026 1029 fail(res) {
... ...
... ... @@ -224,6 +224,13 @@ function banknoCheck(bankno) {
224 224 }
225 225 }
226 226
  227 +function checkEmail(email){
  228 + // var regEmail = /^(((([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-\\x{D7FF}\\x{F900}-\\x{FDCF}\\x{FDF0}-\\x{FFEF}])+(\\.([a-zA-Z]|\\d|[!#\\$%&'\\*\\+\\-\\/=\\?\\^_`{\\|}~]|[\\x{00A0}-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^&;*_=+}{/'?]+)*@([a-z0-9_][-a-z0-9_]*(/.[-a-z0-9_]+)* /.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}/.[0-9]{1,3}/.[0-9]{1,3}/.[0-9]{1,3}))(:[0-9]{1,5})?$");
  231 + // return regEmail.test(email);
  232 +}
  233 +
227 234
228 235 module.exports = {
229 236 formatTime: formatTime,
... ... @@ -239,5 +246,6 @@ module.exports = {
239 246 checkNumber: checkNumber,
240 247 isMobile: isMobile,
241 248 getAge: getAge,
242   - banknoCheck: banknoCheck
  249 + banknoCheck: banknoCheck,
  250 + checkEmail: checkEmail
243 251 }
... ...
注册登录 后发表评论