From ce675b78078928b955ff64235014c5d8a4b2e6ad Mon Sep 17 00:00:00 2001 From: chenrx Date: Tue, 4 Jun 2024 10:53:12 +0800 Subject: [PATCH] 20240604 --- pages/channel/index.js | 43 ++++++++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 18 deletions(-) diff --git a/pages/channel/index.js b/pages/channel/index.js index 368a419..b2527b3 100644 --- a/pages/channel/index.js +++ b/pages/channel/index.js @@ -38,6 +38,7 @@ Page({ deallist:'', hoursTip:'', isShowProfile:true,//是否显示授权用户信息按钮 + propvince_id:'',//默认省 }, onLoad(options) { @@ -117,23 +118,23 @@ Page({ //获取系统配置城市 getAppCity(){ - _.apiQuery.getAppCity().then(res => { - let cityArray = [] - res.data.list.forEach((item,index) => { - cityArray.push(item.name) - if(item.city_id==res.data.default){ - this.setData({ - cityIndex:index, - }) - } - }) - this.setData({ - city_id:res.data.default, - cityArray:cityArray, - cityList:res.data.list, - }) - this.getAppUserBizs() - }); + // _.apiQuery.getAppCity().then(res => { + // let cityArray = [] + // res.data.list.forEach((item,index) => { + // cityArray.push(item.name) + // if(item.city_id==res.data.default){ + // this.setData({ + // cityIndex:index, + // }) + // } + // }) + // this.setData({ + // city_id:res.data.default, + // cityArray:cityArray, + // cityList:res.data.list, + // }) + // this.getAppUserBizs() + // }); }, //20240526 获取系统配置城市省市 @@ -157,11 +158,15 @@ Page({ }) } }); + this.setData({ area_id: area_id, area_list: area_list, - areaArr: areaArr + areaArr: areaArr, + province_id:area_id[0], + city_id:area_id[1] }) + this.getAppUserBizs() }); }, @@ -170,6 +175,7 @@ Page({ //获取管理门店 getAppUserBizs(){ let params = {}; + params['province_id'] = this.data.province_id; params['city_id'] = this.data.city_id; _.apiQuery.getAppUserBizs(params).then(res => { this.setData({ @@ -192,6 +198,7 @@ Page({ //20240526选择地区 changeArea(e){ this.setData({ + province_id:this.data.area_list[e.detail.value[0]]['propvince_id'], city_id:this.data.area_list[e.detail.value[0]].children[e.detail.value[1]].city_id, areaIndex: e.detail.value, })