diff --git a/packageA/pages/profile/profile.js b/packageA/pages/profile/profile.js index f30aada..111b618 100644 --- a/packageA/pages/profile/profile.js +++ b/packageA/pages/profile/profile.js @@ -502,12 +502,12 @@ Page({ errorMess = "您输入的身份证号不存在!"; isPass = false; } - } - } + }; + }; var returnParam = { 'errorMess': errorMess, 'isPass': isPass - } + }; if (errorMess != "") { // wx.showModal({ // title: errorMess, @@ -524,7 +524,7 @@ Page({ this.setData({ id: null, }); - } + }; return returnParam; }, //------初始化加载---------- @@ -968,7 +968,10 @@ Page({ } else { isAgree = false; }; - this.data.isAgree = isAgree; + // this.data.isAgree = isAgree; + this.setData({ + isAgree, + }); console.log(isAgree); }, @@ -976,20 +979,61 @@ Page({ //保存 save: function() { var th = this; - let isAgree = this.data.isAgree; + // let isAgree = this.data.isAgree; // 同意协议 - if(isAgree) { - var sto_sele_id = self.data.sto_sele_id; + // if(isAgree) { + var sto_sele_id = this.data.sto_sele_id; + let tjrname = this.data.referee; + if (tjrname == "" || tjrname == null) { + app.my_warnning("请输入推荐人", 0, this); + return false; + }; + let vipname = this.data.name; + if (vipname == "" || vipname == null) { + app.my_warnning("请输入姓名", 0, this); + return false; + }; + let sex = this.data.isGender; + if (sex != "1" && sex != "2") { + app.my_warnning("请选择性别", 0, this); + return false; + }; + let birthday = this.data.datet; + if (birthday == "" || birthday == null) { + app.my_warnning("请选择出生日期", 0, this); + return false; + }; + let idcard = this.data.id; + if (idcard == "" || idcard == null) { + app.my_warnning("请输入身份证号码", 0, this); + return false; + }; + let address = this.data.address; + if (address == "" || address == null) { + app.my_warnning("请输入地址", 0, this); + return false; + }; + let pickup_id = sto_sele_id; + if (pickup_id == "" || pickup_id == null) { + app.my_warnning("请输入地址", 0, this); + return false; + }; + let isAgree = this.data.isAgree; + if(!isAgree) { + app.my_warnning("请您先阅读和勾选指定的内容", 0, this); + return false; + }; + var data = { store_id: r.stoid, user_id: app.globalData.user_id, - tjrname: self.data.referee, //推荐人 - vipname: self.data.name, //名称 - sex: self.data.isGender, //性别 + tjrname: tjrname, //推荐人 + vipname: vipname, //名称 + sex: sex, //性别 birthday: self.data.datet, islunar: self.data.isLunar, idcard: self.data.id, - address: self.data.address, + address: address, pickup_id: sto_sele_id ,//自提门店 所属门店 }; @@ -1008,9 +1052,9 @@ Page({ } }) - } else { - app.my_warnning("请您先阅读和勾选指定的内容", 0, self); - }; + // } else { + // app.my_warnning("请您先阅读和勾选指定的内容", 0, self); + // }; // var isstcsp = th.data.isstcsp; //是否启用消费密码 // var phone = th.data.phone; //手机号码 // if (phone == "" || phone == null) { diff --git a/packageA/pages/profile/profile.wxml b/packageA/pages/profile/profile.wxml index 9cf5482..6b9cbf2 100644 --- a/packageA/pages/profile/profile.wxml +++ b/packageA/pages/profile/profile.wxml @@ -87,7 +87,7 @@ 身份证: - + +{{reg_info.idcard}}积分 +{{reg_info.idcard}}成长值