订单手机号,身份证去除空格
This commit is contained in:
@@ -354,6 +354,12 @@ Page({
|
||||
nextstep(){
|
||||
switch (this.data.step) {
|
||||
case 1:
|
||||
this.setData({
|
||||
mobile:this.trimAll(this.data.mobile),
|
||||
cardid:this.trimAll(this.data.cardid),
|
||||
owner_mobile:this.trimAll(this.data.owner_mobile),
|
||||
owner_cardid:this.trimAll(this.data.owner_cardid),
|
||||
})
|
||||
if (this.data.customerIndex == -1 ) {
|
||||
wx.showToast({
|
||||
title: '请选择客户',
|
||||
@@ -1262,4 +1268,13 @@ Page({
|
||||
this.getAppCusorderV2()
|
||||
},
|
||||
|
||||
//去除空格
|
||||
trimAll(ele){
|
||||
if(typeof ele === 'string'){
|
||||
return ele.split(' ').join('');
|
||||
}else{
|
||||
console.error(`${typeof ele} is not the expected type, but the string type is expected`)
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
@@ -287,4 +287,13 @@ Page({
|
||||
}
|
||||
},
|
||||
|
||||
//去除空格
|
||||
trimAll(ele){
|
||||
if(typeof ele === 'string'){
|
||||
return ele.split(' ').join('');
|
||||
}else{
|
||||
console.error(`${typeof ele} is not the expected type, but the string type is expected`)
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
@@ -123,6 +123,12 @@ Page({
|
||||
nextstep(){
|
||||
switch (this.data.step) {
|
||||
case 1:
|
||||
this.setData({
|
||||
mobile:this.trimAll(this.data.mobile),
|
||||
cardid:this.trimAll(this.data.cardid),
|
||||
owner_mobile:this.trimAll(this.data.owner_mobile),
|
||||
owner_cardid:this.trimAll(this.data.owner_cardid),
|
||||
})
|
||||
if (this.data.name == '' ) {
|
||||
wx.showToast({
|
||||
title: '请输入客户姓名',
|
||||
@@ -740,6 +746,12 @@ Page({
|
||||
|
||||
//点击收取意向金
|
||||
createV2Inten() {
|
||||
this.setData({
|
||||
mobile:this.trimAll(this.data.mobile),
|
||||
cardid:this.trimAll(this.data.cardid),
|
||||
owner_mobile:this.trimAll(this.data.owner_mobile),
|
||||
owner_cardid:this.trimAll(this.data.owner_cardid),
|
||||
})
|
||||
if (this.data.name == '' ) {
|
||||
wx.showToast({
|
||||
title: '请输入客户姓名',
|
||||
@@ -1359,4 +1371,13 @@ Page({
|
||||
})
|
||||
},
|
||||
|
||||
//去除空格
|
||||
trimAll(ele){
|
||||
if(typeof ele === 'string'){
|
||||
return ele.split(' ').join('');
|
||||
}else{
|
||||
console.error(`${typeof ele} is not the expected type, but the string type is expected`)
|
||||
}
|
||||
},
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user