Commit 5412a409 authored by 陈宗胤(贵阳日报)'s avatar 陈宗胤(贵阳日报)
parents d1714614 f74b9e9d
...@@ -294,7 +294,7 @@ const activeId = ref(1); ...@@ -294,7 +294,7 @@ const activeId = ref(1);
const shopInfo = ref({}); const shopInfo = ref({});
// 店铺轮播图 // 店铺轮播图
const shopSwiperList = ref([]); const shopSwiperList = ref([]);
// 当前位置的经纬度 // 当前位置的经纬度-// 店铺的经纬度
const currentLatitudeAndLongitude = ref({ latitude: 0, longitude: 0 }); const currentLatitudeAndLongitude = ref({ latitude: 0, longitude: 0 });
// 团购商品列表 // 团购商品列表
const listOfGroupBuyingProducts = ref([]); const listOfGroupBuyingProducts = ref([]);
...@@ -304,7 +304,7 @@ const merchantCoupons = ref({}); ...@@ -304,7 +304,7 @@ const merchantCoupons = ref({});
const params = ref({ const params = ref({
current: 1, current: 1,
size: 3, size: 3,
shopId: '1626126617850544129', shopId: '',
isEnd: false, isEnd: false,
}); });
const isLoadReachBottom = ref(null); const isLoadReachBottom = ref(null);
...@@ -320,11 +320,12 @@ const tagList2 = ref([{ name: '免费停车', id: 1 }]); ...@@ -320,11 +320,12 @@ const tagList2 = ref([{ name: '免费停车', id: 1 }]);
// 周边推荐-商家列表 // 周边推荐-商家列表
const recommendedListOfPeripherals = ref([]); const recommendedListOfPeripherals = ref([]);
onLoad((options) => { onLoad((options) => {
getStoreInformationFn('1626126617850544129').then(() => { params.value.shopId = options.shopId;
getStoreInformationFn(options.shopId).then(() => {
peripheryRecomFn(); peripheryRecomFn();
}); });
groupBuyListFn('1626126617850544129'); groupBuyListFn(options.shopId);
couponShopListFn('1626126617850544129'); couponShopListFn(options.shopId);
getEvaluationPageFn(); getEvaluationPageFn();
}); });
onShow(() => { onShow(() => {
...@@ -355,16 +356,16 @@ function peripheryRecomFn() { ...@@ -355,16 +356,16 @@ function peripheryRecomFn() {
recommendedTypesOfPeripherals.value = res.data; recommendedTypesOfPeripherals.value = res.data;
const id = recommendedTypesOfPeripherals.value[0].categoryId; const id = recommendedTypesOfPeripherals.value[0].categoryId;
activeId.value = id; activeId.value = id;
sgyrddShopPageFn(id); sgyrddShopPageFn(id, lat, lon);
} }
}); });
} }
function sgyrddShopPageFn(categoryIds) { function sgyrddShopPageFn(categoryIds, lat, lon) {
const params = { const params = {
current: 1, current: 1,
size: 15, size: 15,
lat: '106.68650025025502', lat,
lon: '26.567192352601154', lon,
categoryIds, categoryIds,
distance: 200, distance: 200,
}; };
...@@ -391,7 +392,7 @@ function getLocationFn() { ...@@ -391,7 +392,7 @@ function getLocationFn() {
success: function (res) { success: function (res) {
// 经纬度 // 经纬度
console.log('res.latitude, res.longitude', res.latitude, res.longitude); console.log('res.latitude, res.longitude', res.latitude, res.longitude);
// 店铺的经纬度
const myLatitude = currentLatitudeAndLongitude.value.latitude; const myLatitude = currentLatitudeAndLongitude.value.latitude;
const myLongitude = currentLatitudeAndLongitude.value.longitude; const myLongitude = currentLatitudeAndLongitude.value.longitude;
const distance = getDistance(res.latitude, res.longitude, myLatitude, myLongitude, 1); const distance = getDistance(res.latitude, res.longitude, myLatitude, myLongitude, 1);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment