Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
groupPurchase-miniapp
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
彭佳妮(贵阳日报)
groupPurchase-miniapp
Commits
5412a409
Commit
5412a409
authored
Aug 02, 2024
by
陈宗胤(贵阳日报)
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.platform.xinhuaapp.com/pengjiani/groupPurchase-miniapp
parents
d1714614
f74b9e9d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
shop.vue
src/pages/shop/shop.vue
+11
-10
No files found.
src/pages/shop/shop.vue
View file @
5412a409
...
...
@@ -294,7 +294,7 @@ const activeId = ref(1);
const
shopInfo
=
ref
({});
// 店铺轮播图
const
shopSwiperList
=
ref
([]);
// 当前位置的经纬度
// 当前位置的经纬度
-// 店铺的经纬度
const
currentLatitudeAndLongitude
=
ref
({
latitude
:
0
,
longitude
:
0
});
// 团购商品列表
const
listOfGroupBuyingProducts
=
ref
([]);
...
...
@@ -304,7 +304,7 @@ const merchantCoupons = ref({});
const
params
=
ref
({
current
:
1
,
size
:
3
,
shopId
:
'
1626126617850544129
'
,
shopId
:
''
,
isEnd
:
false
,
});
const
isLoadReachBottom
=
ref
(
null
);
...
...
@@ -320,11 +320,12 @@ const tagList2 = ref([{ name: '免费停车', id: 1 }]);
// 周边推荐-商家列表
const
recommendedListOfPeripherals
=
ref
([]);
onLoad
((
options
)
=>
{
getStoreInformationFn
(
'1626126617850544129'
).
then
(()
=>
{
params
.
value
.
shopId
=
options
.
shopId
;
getStoreInformationFn
(
options
.
shopId
).
then
(()
=>
{
peripheryRecomFn
();
});
groupBuyListFn
(
'1626126617850544129'
);
couponShopListFn
(
'1626126617850544129'
);
groupBuyListFn
(
options
.
shopId
);
couponShopListFn
(
options
.
shopId
);
getEvaluationPageFn
();
});
onShow
(()
=>
{
...
...
@@ -355,16 +356,16 @@ function peripheryRecomFn() {
recommendedTypesOfPeripherals
.
value
=
res
.
data
;
const
id
=
recommendedTypesOfPeripherals
.
value
[
0
].
categoryId
;
activeId
.
value
=
id
;
sgyrddShopPageFn
(
id
);
sgyrddShopPageFn
(
id
,
lat
,
lon
);
}
});
}
function
sgyrddShopPageFn
(
categoryIds
)
{
function
sgyrddShopPageFn
(
categoryIds
,
lat
,
lon
)
{
const
params
=
{
current
:
1
,
size
:
15
,
lat
:
'106.68650025025502'
,
lon
:
'26.567192352601154'
,
lat
,
lon
,
categoryIds
,
distance
:
200
,
};
...
...
@@ -391,7 +392,7 @@ function getLocationFn() {
success
:
function
(
res
)
{
// 经纬度
console
.
log
(
'res.latitude, res.longitude'
,
res
.
latitude
,
res
.
longitude
);
// 店铺的经纬度
const
myLatitude
=
currentLatitudeAndLongitude
.
value
.
latitude
;
const
myLongitude
=
currentLatitudeAndLongitude
.
value
.
longitude
;
const
distance
=
getDistance
(
res
.
latitude
,
res
.
longitude
,
myLatitude
,
myLongitude
,
1
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment