diff --git a/commons/js/config.js b/commons/js/config.js
index 6532c79..ab78a51 100644
--- a/commons/js/config.js
+++ b/commons/js/config.js
@@ -189,6 +189,8 @@ api = {
appScoreLists: "app/score/lists", //运营分排行
appScoreDetail: "app/score/detail", //运营分详情
appRadar: "app/score/radar", //雷达图数据
+
+ appPaic: "app/paic", //平安用户
}
//远程图片存储地址
diff --git a/commons/js/utils/apiQuery.js b/commons/js/utils/apiQuery.js
index d1829ed..faef756 100644
--- a/commons/js/utils/apiQuery.js
+++ b/commons/js/utils/apiQuery.js
@@ -1087,4 +1087,11 @@ apiQuery.appRadar = function(params){
})
}
+//雷达图
+apiQuery.appPaic = function(params){
+ return new Promise(function (resolve, reject) {
+ HttpRequest(false, Config.api.appPaic, 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 1c67f2c..a004682 100644
--- a/components/brandSelect/index.js
+++ b/components/brandSelect/index.js
@@ -35,7 +35,19 @@ Component({
overlayStyle: {
type: String,
value: 'background-color: rgba(0, 0, 0, 0.7)'
+ },
+ title: {
+ type: String,
+ value: '品牌名'
},
+ loadAll: {
+ type: Boolean,
+ value: false
+ },
+ apiType: {
+ type: String,
+ value: ''
+ }
},
attached(){
debouncetimer = null
@@ -57,25 +69,6 @@ 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: '宝马'
- // }],
cur: -1,
keyword: '',
item: {}
@@ -89,7 +82,14 @@ Component({
// console.log(res)
},
onEnter(res) {
+ this.setData({
+ keyword:'',
+ list:[]
+ })
// console.log(res)
+ if(this.data.loadAll){
+ this.apiGetMbrand('')
+ }
this.triggerEvent('enter')
},
onAfterEnter(res) {
@@ -158,11 +158,20 @@ Component({
//app/series/mbrand
apiGetMbrand(keyword){
- _.apiQuery.getMbrand({keyword}).then(res => {
- this.setData({
- list: res.data.list
+ if(this.data.apiType=='appPaic'){
+ _.apiQuery.appPaic({keyword}).then(res => {
+ this.setData({
+ list: res.data.list
+ })
})
- })
+ }else{
+ _.apiQuery.getMbrand({keyword}).then(res => {
+ this.setData({
+ list: res.data.list
+ })
+ })
+ }
+
}
}
})
\ No newline at end of file
diff --git a/components/brandSelect/index.wxml b/components/brandSelect/index.wxml
index 1430a5c..d7da34c 100644
--- a/components/brandSelect/index.wxml
+++ b/components/brandSelect/index.wxml
@@ -4,7 +4,7 @@
-
+
@@ -21,7 +21,7 @@
-
+
diff --git a/pages/customer/addCard/index.js b/pages/customer/addCard/index.js
index d30c823..2d9c77a 100644
--- a/pages/customer/addCard/index.js
+++ b/pages/customer/addCard/index.js
@@ -61,6 +61,12 @@ Page({
car_id: '', //车型id
carIndex: -1, //车型索引
carArray: [],
+ cf_pid: '', //平安用户id
+ cf_name: '', //平安用户名
+ cf_pid_page_show: false,
+ searchTitle: '品牌名',
+ loadAll: false,
+ apiType: 'brand',
},
//生命周期函数--监听页面加载
onLoad: function (options) {
@@ -373,6 +379,7 @@ Page({
params['brand_id'] = this.data.brand_id;
params['series_id'] = this.data.series_id;
params['car_id'] = this.data.car_id;
+ params['cf_pid'] = this.data.cf_pid;
_.apiQuery.postAppCustomers(params).then(res => {
//刷新列表页
@@ -703,6 +710,18 @@ Page({
//显示选择品牌
bindShowBrand() {
this.setData({
+ searchTitle: '品牌名',
+ loadAll: false,
+ apiType: '',
+ brand_page_show: true
+ })
+ },
+ //显示选择平安用户
+ bindShowCfPid() {
+ this.setData({
+ searchTitle: '用户名',
+ loadAll: false,
+ apiType: 'appPaic',
brand_page_show: true
})
},
@@ -710,18 +729,32 @@ Page({
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
- modelArray: [],
- modelIndex: -1, //车系车型索引
- car_id: '', //车系id
- carArray: [], //车辆版本列表
- carIndex: -1, //车辆版本索引
- })
- this.getAppSeries()
+ if (this.data.apiType == 'appPaic') {
+ this.setData({
+ cf_pid: e.detail.item.id,
+ cf_name: e.detail.item.name
+ })
+ } else {
+ this.setData({
+ brand_id: e.detail.item.id,
+ brand_name: e.detail.item.name,
+ brandIndex: e.detail.index,
+ series_id: '', //车系id
+ modelArray: [],
+ modelIndex: -1, //车系车型索引
+ car_id: '', //车系id
+ carArray: [], //车辆版本列表
+ carIndex: -1, //车辆版本索引
+ })
+ this.getAppSeries()
+ }
+ } else {
+ if (this.data.apiType == 'appPaic') {
+ this.setData({
+ cf_pid: '',
+ cf_name: ''
+ })
+ }
}
- }
+ },
})
\ No newline at end of file
diff --git a/pages/customer/addCard/index.wxml b/pages/customer/addCard/index.wxml
index 0299c2f..581c86c 100644
--- a/pages/customer/addCard/index.wxml
+++ b/pages/customer/addCard/index.wxml
@@ -154,7 +154,7 @@
重点关注车型
-
+
{{brand_name||'请选择'}}
请选择
@@ -171,6 +171,15 @@
+
+
+ 平安推荐
+
+ {{cf_name||'请选择'}}
+ 请选择
+
+
+
重点关注车型
-
-
- {{brand_name||'请选择'}}
- 请选择
-
-
+
+ {{brand_name||'请选择'}}
+ 请选择
+
@@ -160,6 +158,15 @@
+
+
+ 平安推荐
+
+ {{cf_name||'请选择'}}
+ 请选择
+
+
+
@@ -193,4 +200,4 @@
-
\ No newline at end of file
+
\ No newline at end of file