Commit d5f1126d authored by 华国豪's avatar 华国豪 🙄

修改代码

parent 8fcc29ec
......@@ -82,7 +82,11 @@ Page({
}
},
phone:function(e){
if (e.detail.value.length == 11){
let val = e.detail.value.replace(/\s*/g, "");
this.setData({
content: val,
})
if (val.length == 11){
app.$api('miniProgram_customer_GetCustomerByPhone', { code: this.data.code, Contact: e.detail.value, openid: this.data.openid}).then(res => {
this.setData({ telephone: true, isMember: res.isMember, Phonedata: res})
}).catch(err => {
......@@ -93,11 +97,11 @@ Page({
duration: 2000
})
})
} else if (e.detail.value.length != 11){
} else if (val != 11){
this.setData({ telephone: false,})
}
this.setData({
content: e.detail.value,
content: val,
})
},
qr:function(){
......@@ -171,8 +175,6 @@ Page({
OrderForm: 4,
CustomerCreateBy: this.data.createBy,
}
console.log(msg)
return
//提交数据
let that = this;
let data = that.data.Phonedata.contactNumber;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment