|
@@ -49,7 +49,7 @@
|
|
|
<img :src="item.icon" width="80" height="80" />
|
|
|
<view class="info">
|
|
|
<view class="name">{{ item.name }}</view>
|
|
|
- <view class="distance">距离:{{ item.distance / 1000 }}KM</view>
|
|
|
+ <!-- <view class="distance">距离:{{ item.distance / 1000 }}KM</view> -->
|
|
|
<view class="address">地址:{{ item.address }}</view>
|
|
|
</view>
|
|
|
<view class="button" flex around>
|
|
@@ -132,6 +132,7 @@ export default {
|
|
|
province: "440000",
|
|
|
city: "440300",
|
|
|
area: "440305",
|
|
|
+ // area: "",
|
|
|
},
|
|
|
// 线下店铺
|
|
|
list: [],
|
|
@@ -211,16 +212,22 @@ export default {
|
|
|
options().then((res) => {
|
|
|
if (res.code === 0) {
|
|
|
let value = [];
|
|
|
- // 市
|
|
|
+
|
|
|
+ // 省
|
|
|
that.locationList[0] = res.data;
|
|
|
- value[0] = that.locationList[0].findIndex((i) => i);
|
|
|
+ value[0] = that.locationList[0].findIndex((i) =>
|
|
|
+ that.province.includes(i.name)
|
|
|
+ );
|
|
|
+ // 市
|
|
|
that.locationList[1] = that.locationList[0][value[0]].childList;
|
|
|
- value[1] = that.locationList[1].findIndex((i) => i);
|
|
|
- // 省
|
|
|
+ value[1] = that.locationList[1].findIndex((i) => that.city == i.name);
|
|
|
+ // 区
|
|
|
if (value[1] !== -1) {
|
|
|
that.locationList[2] = that.locationList[1][value[1]].childList;
|
|
|
} else {
|
|
|
+ that.locationList[2] = "";
|
|
|
}
|
|
|
+ that.pickerValue = value;
|
|
|
that.getList();
|
|
|
}
|
|
|
});
|
|
@@ -401,7 +408,6 @@ export default {
|
|
|
this.form.area = this.locationList[2][index[2]].id;
|
|
|
this.district = this.locationList[2][index[2]].name;
|
|
|
}
|
|
|
- console.log("gadsfqwrqwrq=00==" + JSON.stringify(this.locationList));
|
|
|
this.getList();
|
|
|
},
|
|
|
|
|
@@ -416,17 +422,15 @@ export default {
|
|
|
// this.form.province = this.province;
|
|
|
// this.form.city = this.city;
|
|
|
// this.form.area = this.district;
|
|
|
- console.log("gadsfqwrqwrq=333==" + JSON.stringify(this.form));
|
|
|
list(this.form).then((res) => {
|
|
|
- console.log("gadsfqwrqwrq=22==" + JSON.stringify(res));
|
|
|
if (res.code === 0) {
|
|
|
if (res.data.records.length > 0) {
|
|
|
res.data.records.map((i) => {
|
|
|
this.list.push(i);
|
|
|
- this.getMarker(i.longitude, i.latitude);
|
|
|
+ // this.getMarker(i.longitude, i.latitude);
|
|
|
});
|
|
|
this.hasMore = res.data.hasMore;
|
|
|
- this.map.setCenter([this.list[0].longitude, this.list[0].latitude]);
|
|
|
+ // this.map.setCenter([this.list[0].longitude, this.list[0].latitude]);
|
|
|
} else {
|
|
|
this.getStoreList();
|
|
|
}
|