|
|
@ -229,14 +229,40 @@ |
|
|
|
imgadres3: 'noorder.png', |
|
|
|
imgadres3: 'noorder.png', |
|
|
|
imgadres4: 'dh.png', |
|
|
|
imgadres4: 'dh.png', |
|
|
|
marker: '', //商户 |
|
|
|
marker: '', //商户 |
|
|
|
typeid: 0, //选择分类 |
|
|
|
typeid: 99999999, //选择分类 |
|
|
|
isSelected: 1, //是否选择下拉 |
|
|
|
isSelected: 1, //是否选择下拉 |
|
|
|
selectFirst: '', //筛选是否有值 |
|
|
|
selectFirst: '99999999', //筛选是否有值 |
|
|
|
selectFirstName: '', //筛选值名字 |
|
|
|
selectFirstName: '全部', //筛选值名字 |
|
|
|
selectChiler: 2, // 一级子菜单筛选 |
|
|
|
selectChiler: 2, // 一级子菜单筛选 |
|
|
|
selectChilerdistance: 2, // 二级子菜单筛选 |
|
|
|
selectChilerdistance: 2, // 二级子菜单筛选 |
|
|
|
goodsFirstClassList: '', //商品一级分类 |
|
|
|
goodsFirstClassList: [{ |
|
|
|
goodsSendotClassList: '', //商品一级分类 |
|
|
|
"childIndustry": null, |
|
|
|
|
|
|
|
"createTime": 1640252815000, |
|
|
|
|
|
|
|
"name": "全部", |
|
|
|
|
|
|
|
"id": 99999999, |
|
|
|
|
|
|
|
"wechatCompanyCode": "716", |
|
|
|
|
|
|
|
"wechatName": "全部", |
|
|
|
|
|
|
|
"ext3": null, |
|
|
|
|
|
|
|
"parentId": 1, |
|
|
|
|
|
|
|
"wechatSelfEmployedCode": "719", |
|
|
|
|
|
|
|
"ext2": null, |
|
|
|
|
|
|
|
"status": 1, |
|
|
|
|
|
|
|
"ext1": "650" |
|
|
|
|
|
|
|
}], //商品一级分类 |
|
|
|
|
|
|
|
goodsSendotClassList: [{ |
|
|
|
|
|
|
|
"childIndustry": null, |
|
|
|
|
|
|
|
"createTime": 1640252998000, |
|
|
|
|
|
|
|
"name": "全部", |
|
|
|
|
|
|
|
"id": 99999999, |
|
|
|
|
|
|
|
"wechatCompanyCode": "716", |
|
|
|
|
|
|
|
"wechatName": "全部", |
|
|
|
|
|
|
|
"ext3": null, |
|
|
|
|
|
|
|
"parentId": 13, |
|
|
|
|
|
|
|
"wechatSelfEmployedCode": "719", |
|
|
|
|
|
|
|
"ext2": null, |
|
|
|
|
|
|
|
"status": 1, |
|
|
|
|
|
|
|
"ext1": "642" |
|
|
|
|
|
|
|
}], //商品一级分类 |
|
|
|
distanceList: [{ |
|
|
|
distanceList: [{ |
|
|
|
id: 1, |
|
|
|
id: 1, |
|
|
|
title: '1km' |
|
|
|
title: '1km' |
|
|
@ -292,17 +318,19 @@ |
|
|
|
getIndustry() { |
|
|
|
getIndustry() { |
|
|
|
getIndustry().then(res => { |
|
|
|
getIndustry().then(res => { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
if (res.return_code == '000000') { |
|
|
|
this.goodsFirstClassList = res.return_data; |
|
|
|
for (var i = 0; i < res.return_data.length; i++) { |
|
|
|
this.typeid = res.return_data[0].id; |
|
|
|
this.goodsFirstClassList.push(res.return_data[i]); |
|
|
|
this.goodsSendotClassList = res.return_data[0].childIndustry; |
|
|
|
} |
|
|
|
this.selectFirst = res.return_data[0].childIndustry[0].id; |
|
|
|
// this.typeid = res.return_data[0].id; |
|
|
|
this.selectFirstName = res.return_data[0].childIndustry[0].name; |
|
|
|
// this.goodsSendotClassList = res.return_data[0].childIndustry; |
|
|
|
|
|
|
|
// this.selectFirst = res.return_data[0].childIndustry[0].id; |
|
|
|
|
|
|
|
// this.selectFirstName = res.return_data[0].childIndustry[0].name; |
|
|
|
let platform = uni.getSystemInfoSync().platform; |
|
|
|
let platform = uni.getSystemInfoSync().platform; |
|
|
|
if (platform == 'android') { |
|
|
|
if (platform == 'android') { |
|
|
|
this.typeplat = 2; |
|
|
|
this.typeplat = 2; |
|
|
|
this.getMapStore(); |
|
|
|
this.getMapStore(); |
|
|
|
} |
|
|
|
} |
|
|
|
if (platform == 'ios') { |
|
|
|
if (platform == 'ios' || platform == 'devtools') { |
|
|
|
this.typeplat = 1; |
|
|
|
this.typeplat = 1; |
|
|
|
this.getMapStore(); |
|
|
|
this.getMapStore(); |
|
|
|
} |
|
|
|
} |
|
|
@ -311,11 +339,17 @@ |
|
|
|
}, |
|
|
|
}, |
|
|
|
//查询商户 |
|
|
|
//查询商户 |
|
|
|
getMapStore() { |
|
|
|
getMapStore() { |
|
|
|
|
|
|
|
let childId = ''; |
|
|
|
|
|
|
|
if (this.selectFirst == 99999999) { |
|
|
|
|
|
|
|
childId = ''; |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
childId = this.selectFirst |
|
|
|
|
|
|
|
} |
|
|
|
let datas = { |
|
|
|
let datas = { |
|
|
|
distance: this.distance, |
|
|
|
distance: this.distance, |
|
|
|
name: this.searchName, |
|
|
|
name: this.searchName, |
|
|
|
type: this.typeplat, |
|
|
|
type: this.typeplat, |
|
|
|
childId: this.selectFirst, |
|
|
|
childId: childId, |
|
|
|
longitude: this.longitude, |
|
|
|
longitude: this.longitude, |
|
|
|
latitude: this.latitude |
|
|
|
latitude: this.latitude |
|
|
|
} |
|
|
|
} |
|
|
@ -482,7 +516,7 @@ |
|
|
|
type: 'wgs84', |
|
|
|
type: 'wgs84', |
|
|
|
success: (res) => { |
|
|
|
success: (res) => { |
|
|
|
uni.hideLoading(); |
|
|
|
uni.hideLoading(); |
|
|
|
console.log(res, '获取当前位置') |
|
|
|
// console.log(res, '获取当前位置') |
|
|
|
this.longitude = res.longitude; |
|
|
|
this.longitude = res.longitude; |
|
|
|
this.latitude = res.latitude; |
|
|
|
this.latitude = res.latitude; |
|
|
|
this.getIndustry(); |
|
|
|
this.getIndustry(); |
|
|
@ -498,9 +532,29 @@ |
|
|
|
//选择类型 |
|
|
|
//选择类型 |
|
|
|
changeType(item) { |
|
|
|
changeType(item) { |
|
|
|
this.typeid = item.id; |
|
|
|
this.typeid = item.id; |
|
|
|
|
|
|
|
if (item.id == 99999999) { |
|
|
|
|
|
|
|
this.goodsSendotClassList = [{ |
|
|
|
|
|
|
|
"childIndustry": null, |
|
|
|
|
|
|
|
"createTime": 1640252998000, |
|
|
|
|
|
|
|
"name": "全部", |
|
|
|
|
|
|
|
"id": 99999999, |
|
|
|
|
|
|
|
"wechatCompanyCode": "716", |
|
|
|
|
|
|
|
"wechatName": "全部", |
|
|
|
|
|
|
|
"ext3": null, |
|
|
|
|
|
|
|
"parentId": 13, |
|
|
|
|
|
|
|
"wechatSelfEmployedCode": "719", |
|
|
|
|
|
|
|
"ext2": null, |
|
|
|
|
|
|
|
"status": 1, |
|
|
|
|
|
|
|
"ext1": "642" |
|
|
|
|
|
|
|
}]; |
|
|
|
|
|
|
|
this.selectFirst = '99999999'; |
|
|
|
|
|
|
|
this.selectFirstName = '全部'; |
|
|
|
|
|
|
|
}else{ |
|
|
|
this.goodsSendotClassList = item.childIndustry; |
|
|
|
this.goodsSendotClassList = item.childIndustry; |
|
|
|
this.selectFirst = item.childIndustry[0].id; |
|
|
|
this.selectFirst = item.childIndustry[0].id; |
|
|
|
this.selectFirstName = item.childIndustry[0].name; |
|
|
|
this.selectFirstName = item.childIndustry[0].name; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
this.getMapStore(); |
|
|
|
this.getMapStore(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
//子菜单显示 |
|
|
|
//子菜单显示 |
|
|
|