diff --git a/commons/js/config.js b/commons/js/config.js
index dcf695a..b9778ce 100644
--- a/commons/js/config.js
+++ b/commons/js/config.js
@@ -181,6 +181,9 @@ api = {
appSignConf: "app/sign/conf", //签到配置信息
appUserConf: "app/sign/userConf", //用户签到配置信息
appSign: "app/sign", //用户签到
+
+
+ appSeriesMbrand: "app/series/mbrand" //获取车系品牌
}
//远程图片存储地址
diff --git a/commons/js/utils/apiQuery.js b/commons/js/utils/apiQuery.js
index 1965350..646efb3 100644
--- a/commons/js/utils/apiQuery.js
+++ b/commons/js/utils/apiQuery.js
@@ -1053,4 +1053,10 @@ apiQuery.putAppCusorderStatus = function (params) {
HttpRequest(true, Config.api.appCusorderStatus, 2, params, "PUT", resolve, reject)
})
}
+
+apiQuery.getMbrand = function (params) {
+ return new Promise(function (resolve, reject) {
+ HttpRequest(false, Config.api.appSeriesMbrand, 2, params, "GET", resolve, reject)
+ })
+}
export default apiQuery;
\ No newline at end of file
diff --git a/components/brandSelect/index.js b/components/brandSelect/index.js
index 79093e2..ec581f8 100644
--- a/components/brandSelect/index.js
+++ b/components/brandSelect/index.js
@@ -35,7 +35,7 @@ Component({
overlayStyle: {
type: String,
value: 'background-color: rgba(0, 0, 0, 0.7)'
- },
+ },
},
attached(){
debouncetimer = null
@@ -56,26 +56,26 @@ Component({
*/
data: {
show_page: false,
- // list: [],
- list: [{
- id: 1,
- name: '宝马'
- },{
- id: 1,
- name: '宝马'
- },{
- id: 1,
- name: '宝马'
- },{
- id: 1,
- name: '宝马'
- },{
- id: 1,
- name: '宝马'
- },{
- id: 1,
- name: '宝马'
- }],
+ list: [],
+ // list: [{
+ // id: 1,
+ // name: '宝马'
+ // },{
+ // id: 1,
+ // name: '宝马'
+ // },{
+ // id: 1,
+ // name: '宝马'
+ // },{
+ // id: 1,
+ // name: '宝马'
+ // },{
+ // id: 1,
+ // name: '宝马'
+ // },{
+ // id: 1,
+ // name: '宝马'
+ // }],
cur: -1,
keyword: '',
item: {}
@@ -119,16 +119,21 @@ Component({
let that = this
that.debounce(function(){
that.setData({
- keyword: e.detail.value
+ keyword: e.detail.value,
+ cur: -1,
+ item: {}
})
- console.log(1)
- },200)
+ if(e.detail.value){
+ that.apiGetMbrand(e.detail.value)
+ }
+ },500)
},
bindSelectIndex(e){
console.log(e)
this.setData({
cur: e.currentTarget.dataset.index
})
+
},
/**
* 函数防抖
@@ -150,5 +155,14 @@ Component({
}, gapTime)
})()
},
+
+ //app/series/mbrand
+ apiGetMbrand(keyword){
+ _.apiQuery.getMbrand({keyword}).then(res => {
+ this.setData({
+ list: res.data.list
+ })
+ })
+ }
}
})
\ No newline at end of file
diff --git a/pages/login/index.wxml b/pages/login/index.wxml
index 499648f..998c727 100644
--- a/pages/login/index.wxml
+++ b/pages/login/index.wxml
@@ -39,8 +39,8 @@
-->
-
-
+
diff --git a/pages/order/edit/index2.js b/pages/order/edit/index2.js
index 031f989..9d52727 100644
--- a/pages/order/edit/index2.js
+++ b/pages/order/edit/index2.js
@@ -26,6 +26,7 @@ Page({
isShowSelectCustomer: false,
brand_id: '', //品牌
+ brand_name: '', //品牌名称
brandIndex: -1, //车辆品牌索引
series_id: '', //车系id
modelIndex: -1, //车系车型索引
@@ -85,6 +86,7 @@ Page({
color: res.data.color,
in_color: res.data.in_color,
brand_id: res.data.brand_id,
+ brand_name: res.data.brand_name,
series_id: res.data.series_id,
car_id: res.data.car_id,
firstPayIndex: res.data.downpayment_type - 1,
@@ -585,6 +587,25 @@ Page({
this.setData({
brand_page_show: true
})
+ },
+
+ //获取品牌信息
+ getBrandData(e){
+ // console.log(e.detail)
+ if(e.detail.index>-1&&e.detail.item){
+ this.setData({
+ brand_id: e.detail.item.id,
+ brand_name: e.detail.item.name,
+ brandIndex: e.detail.index,
+ series_id: '', //车系id
+ car_id: '', //车系id
+ modelIndex: -1, //车系车型索引
+ levelArray: [], //车辆版本列表
+ levelIndex: -1, //车辆版本索引
+ business_type: 0,
+ })
+ this.getAppSeries()
+ }
}
})
\ No newline at end of file
diff --git a/pages/order/edit/index2.wxml b/pages/order/edit/index2.wxml
index abd15df..d0c9ec0 100644
--- a/pages/order/edit/index2.wxml
+++ b/pages/order/edit/index2.wxml
@@ -20,8 +20,8 @@
{{brandArray[brandIndex]}}
-->
- 请选择
-
+ {{brand_name}}
+ 请选择
@@ -238,7 +238,7 @@
-
+
diff --git a/pages/order/register/index.js b/pages/order/register/index.js
index 621d623..275e940 100644
--- a/pages/order/register/index.js
+++ b/pages/order/register/index.js
@@ -20,6 +20,7 @@ Page({
mobile: '', //手机号
cardid: '', //身份证
brand_id: '', //品牌
+ brand_name: '', //品牌名称
series_id: '', //车系id
car_id: '', //车辆版本id
brandIndex: -1, //车辆品牌索引
@@ -520,5 +521,23 @@ Page({
this.setData({
brand_page_show: true
})
+ },
+
+ //获取品牌信息
+ getBrandData(e){
+ // console.log(e.detail)
+ if(e.detail.index>-1&&e.detail.item){
+ this.setData({
+ brand_id: e.detail.item.id,
+ brand_name: e.detail.item.name,
+ brandIndex: e.detail.index,
+ series_id: '', //车系id
+ car_id: '',
+ modelIndex: -1, //车系车型索引
+ carIndex: -1, //车辆版本索引
+ business_type: 0,
+ })
+ this.getAppSeries()
+ }
}
})
\ No newline at end of file
diff --git a/pages/order/register/index.wxml b/pages/order/register/index.wxml
index 8dbdd26..92373ec 100644
--- a/pages/order/register/index.wxml
+++ b/pages/order/register/index.wxml
@@ -83,9 +83,9 @@
{{brandArray[brandIndex]}}
-->
- 请选择
-
-
+ {{brand_name||'请选择'}}
+ 请选择
+
@@ -330,6 +330,8 @@
+
+