diff --git a/pages/order/edit/index2.js b/pages/order/edit/index2.js index 3749170..f943144 100644 --- a/pages/order/edit/index2.js +++ b/pages/order/edit/index2.js @@ -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`) + } + }, + }) \ No newline at end of file diff --git a/pages/order/editOwner/index.js b/pages/order/editOwner/index.js index 5fd95f4..9aeb116 100644 --- a/pages/order/editOwner/index.js +++ b/pages/order/editOwner/index.js @@ -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`) + } + }, + }) \ No newline at end of file diff --git a/pages/order/register/index.js b/pages/order/register/index.js index f4af6b0..4b95405 100644 --- a/pages/order/register/index.js +++ b/pages/order/register/index.js @@ -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`) + } + }, + }) \ No newline at end of file