Commit 390547d9103dd40c842c7d94b4a8802cec82b6c9

Authored by season
1 parent 84cd6c0e

会员资料修改控制身份证和地址不一定要强制输入

Showing 1 changed file with 11 additions and 14 deletions
pages/user/userinfo/userinfo.js
... ... @@ -741,26 +741,23 @@ Page({
741 741 var identity_card = th.data.identity_card;//身份证
742 742 console.log("身份证",identity_card);
743 743  
744   - if (identity_card == "" || identity_card == null ) {
745   - getApp().my_warnning("请输入身份证", 0, th);
746   - return false;
747   - } else if (!(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))){
  744 + if (identity_card != "" && !(/(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/.test(identity_card))){
748 745 getApp().my_warnning("身份证号码错误",0, th);
749 746 return false;
750 747 }
751 748 var address = th.data.address;//地址
752   - console.log("地址1010101", address)
753   - if (address == "" || address == null) {
754   - getApp().my_warnning("请输入地址", 0, th);
755   - return false;
756   - }
  749 + // console.log("地址1010101", address)
  750 + // if (address == "" || address == null) {
  751 + // getApp().my_warnning("请输入地址", 0, th);
  752 + // return false;
  753 + // }
757 754 //保存所属门店的id
758 755 var sto_sele_id=th.data.sto_sele_id;
759   - console.log("请输入所属门店的id", sto_sele_id);
760   - if (sto_sele_id == null || sto_sele_id==""){
761   - getApp().my_warnning("请输入所属门店", 0, th);
762   - return false;
763   - }
  756 + // console.log("请输入所属门店的id", sto_sele_id);
  757 + // if (sto_sele_id == null || sto_sele_id==""){
  758 + // getApp().my_warnning("请输入所属门店", 0, th);
  759 + // return false;
  760 + // }
764 761 console.log("要保存的数据", sex, consumption, identity_card, address, user_name);
765 762 var datas = {
766 763 mobile: phone,//手机号码
... ...