diff --git a/pages/customer/addCard/index.js b/pages/customer/addCard/index.js index a219d43..9d358d3 100644 --- a/pages/customer/addCard/index.js +++ b/pages/customer/addCard/index.js @@ -87,8 +87,13 @@ Page({ //获取列表筛选条件-时间 getAppCustomersFilter(){ _.apiQuery.getAppCustomersFilter().then(res => { + let timeArray = [] + res.data.buy_time.forEach(item => { + timeArray.push(item + '天') + }) this.setData({ - timeArray:res.data.buy_time, + timeArray:timeArray, + timeList:res.data.buy_time, timeIndex:-1, }) }); @@ -156,7 +161,7 @@ Page({ //预计购车时间 changeTime(e) { this.setData({ - buy_time:this.data.timeArray[e.detail.value], + buy_time:this.data.timeList[e.detail.value], timeIndex:e.detail.value, }) }, diff --git a/pages/customer/addCard/index.wxml b/pages/customer/addCard/index.wxml index 779e2d1..40a48af 100644 --- a/pages/customer/addCard/index.wxml +++ b/pages/customer/addCard/index.wxml @@ -64,7 +64,7 @@ 请选择 - {{timeArray[timeIndex]}}天 + {{timeArray[timeIndex]}} diff --git a/pages/customer/detail/index.js b/pages/customer/detail/index.js index 3fae1c7..b4ef6fc 100644 --- a/pages/customer/detail/index.js +++ b/pages/customer/detail/index.js @@ -608,8 +608,13 @@ Page({ getAppCustomersFilter(){ _.apiQuery.getAppCustomersFilter().then(res => { + let timeArray = [] + res.data.buy_time.forEach(item => { + timeArray.push(item + '天') + }) this.setData({ - timeArray:res.data.buy_time, + timeArray:timeArray, + timeList:res.data.buy_time, }) if(this.data.baseinfo.buy_time.value != 0){ @@ -625,6 +630,7 @@ Page({ }); }, + //输入 inputTx(e) { this.setData({ @@ -700,7 +706,7 @@ Page({ changeTime(e) { if(this.data.timeIndex != e.detail.value){ this.setData({ - buy_time:this.data.timeArray[e.detail.value], + buy_time:this.data.timeList[e.detail.value], timeIndex:e.detail.value, }) this.putAppCustomerData()