|
|
@@ -65,12 +65,18 @@
|
|
|
<view class="popup-row" style="color: #666666;font-size: 14px;">
|
|
|
门店定位
|
|
|
</view>
|
|
|
- <view class="popup-row" @click="showShopOtions = false" hover-class="navigator-hover"
|
|
|
- style="color: #C30D23;">
|
|
|
- {{ shopDetail.storename }}
|
|
|
- </view>
|
|
|
- <navigator @click="changeShop" class="popup-row" url="/packageA/shop/history" hover-class="navigator-hover"
|
|
|
- open-type="navigate">
|
|
|
+
|
|
|
+ <scroll-view :style="{ maxHeight: tovw(200) }" class="scroll-view" scroll-y>
|
|
|
+ <view class="popup-row" v-for="item in storeList " :key="item.sa_storeid" hover-class="navigator-hover"
|
|
|
+ :style="{
|
|
|
+ color: item.sa_storeid == shopDetail.sa_storeid ? '#C30D23' : ''
|
|
|
+ }" @click="changeStore(item)">
|
|
|
+ {{ item.storename }}
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
+
|
|
|
+ <navigator @click="showShopOtions = false" class="popup-row" url="/packageA/shop/history"
|
|
|
+ hover-class="navigator-hover" open-type="navigate">
|
|
|
历史足迹
|
|
|
</navigator>
|
|
|
<view class="popup-row" hover-class="navigator-hover" @click="getLocaT">
|
|
|
@@ -98,6 +104,7 @@ export default {
|
|
|
},
|
|
|
showShopOtions: false,
|
|
|
getLocationLoading: true,
|
|
|
+ storeList: [],
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
@@ -129,6 +136,10 @@ export default {
|
|
|
callBack()
|
|
|
}, 5000);
|
|
|
},
|
|
|
+ changeStore(item) {
|
|
|
+ this.shopDetail = item;
|
|
|
+ this.showShopOtions = false;
|
|
|
+ },
|
|
|
getLocaT() {
|
|
|
return new Promise((resolve, reject) => {
|
|
|
this.getLocationLoading = true;
|
|
|
@@ -147,9 +158,16 @@ export default {
|
|
|
this.showShopOtions = false;
|
|
|
console.log("获取最近门店信息", res)
|
|
|
if (this.cutoff(res.msg)) return;
|
|
|
- res.data.cover = res.data.attinfos.length ? this.getSpecifiedImage(res.data.attinfos[0]) : uni.getStorageSync('site').logo || ''
|
|
|
- res.data.distance = res.data.distance > 1000 ? ((res.data.distance / 1000).toFixed(2) - 0) + 'km' : ((res.data.distance).toFixed(2) - 0) + 'm'
|
|
|
- this.shopDetail = res.data;
|
|
|
+ if (res.data.length) {
|
|
|
+ let list = res.data.map(v => {
|
|
|
+ v.cover = v.attinfos.length ? this.getSpecifiedImage(v.attinfos[0]) : uni.getStorageSync('site').logo || '';
|
|
|
+ v.distance = v.distance > 1000 ? ((v.distance / 1000).toFixed(2) - 0) + 'km' : ((v.distance).toFixed(2) - 0) + 'm';
|
|
|
+ return v
|
|
|
+ })
|
|
|
+ this.shopDetail = list[0];
|
|
|
+ console.log("shopDetail", this.shopDetail)
|
|
|
+ this.storeList = list;
|
|
|
+ }
|
|
|
})
|
|
|
})
|
|
|
})
|
|
|
@@ -167,9 +185,6 @@ export default {
|
|
|
console.log('fail', fail)
|
|
|
},
|
|
|
});
|
|
|
- },
|
|
|
- changeShop() {
|
|
|
- this.showShopOtions = false;
|
|
|
}
|
|
|
},
|
|
|
}
|