This commit is contained in:
chenrx
2024-06-04 10:53:12 +08:00
parent 765989b3b3
commit ce675b7807
+25 -18
View File
@@ -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,
})