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
2201074b
Commit
2201074b
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
46073972
ca947b37
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
67 additions
and
27 deletions
+67
-27
FoodDetails.vue
src/Components/index/FoodDetails.vue
+6
-1
ShopCard.vue
src/Components/index/ShopCard.vue
+11
-7
index.vue
src/pages/index/index.vue
+8
-2
listFood.vue
src/pages/index/listFood.vue
+16
-2
packageDetails.vue
src/pages/packageDetails/packageDetails.vue
+8
-3
shop.vue
src/pages/shop/shop.vue
+16
-10
index.vue
src/pages/ticket/components/TicketList/index.vue
+2
-2
foodBg.png
src/static/index/foodBg.png
+0
-0
No files found.
src/Components/index/FoodDetails.vue
View file @
2201074b
<
template
>
<
template
>
<view
class=
"card"
v-for=
"(item, index) in cardData"
:key=
"index"
>
<view
@
tap=
"toShop(item.shopId)"
class=
"card"
v-for=
"(item, index) in cardData"
:key=
"index"
>
<image
class=
"img"
:src=
"item.shopLogo"
mode=
"aspectFill"
/>
<image
class=
"img"
:src=
"item.shopLogo"
mode=
"aspectFill"
/>
<view
class=
"right"
>
<view
class=
"right"
>
<text
class=
"text"
>
{{
item
.
shopName
}}
</text>
<text
class=
"text"
>
{{
item
.
shopName
}}
</text>
...
@@ -41,6 +41,11 @@ const props = defineProps({
...
@@ -41,6 +41,11 @@ const props = defineProps({
type
:
Array
,
type
:
Array
,
},
},
});
});
const
toShop
=
(
id
)
=>
{
uni
.
navigateTo
({
url
:
`/pages/shop/shop?shopId=
${
id
}
`
,
});
};
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/Components/index/ShopCard.vue
View file @
2201074b
<
template
>
<
template
>
<view
class=
"card"
>
<view
class=
"card"
>
<view
class=
"head"
:style=
"
{ backgroundImage: `url(${shopCardData.shopLogo})` }">
<view
class=
"head"
>
<image
class=
"imgBg"
:src=
"shopCardData.shopLogo"
mode=
"aspectFill"
/>
<view
class=
"containerBox"
>
<view
class=
"containerBox"
>
<image
class=
"img"
:src=
"shopCardData.shopLogo"
mode=
"aspectFill"
/>
<image
class=
"img"
:src=
"shopCardData.shopLogo"
mode=
"aspectFill"
/>
<view
class=
"right"
>
<view
class=
"right"
>
...
@@ -12,8 +13,8 @@
...
@@ -12,8 +13,8 @@
<text
class=
"four-text"
>
1.2km
</text>
<text
class=
"four-text"
>
1.2km
</text>
</view>
</view>
<view
class=
"threeBox"
>
<view
class=
"threeBox"
>
<image
class=
"img2"
:src=
"shopCardData.evaluationVos
[0]?
.avatar"
mode=
"aspectFill"
/>
<image
class=
"img2"
:src=
"shopCardData.evaluationVos
?.[0]
.avatar"
mode=
"aspectFill"
/>
<text
class=
"one-text"
>
“
{{
shopCardData
.
evaluationVos
[
0
]?
.
evaluation
}}
”
</text>
<text
class=
"one-text"
>
“
{{
shopCardData
.
evaluationVos
?.[
0
]
.
evaluation
}}
”
</text>
</view>
</view>
<view
class=
"labelBox"
>
<view
class=
"labelBox"
>
<view
v-for=
"(item, index) in shopCardData.labels"
:key=
"index"
>
{{
item
}}
</view>
<view
v-for=
"(item, index) in shopCardData.labels"
:key=
"index"
>
{{
item
}}
</view>
...
@@ -55,11 +56,14 @@ const props = defineProps({
...
@@ -55,11 +56,14 @@ const props = defineProps({
.head
{
.head
{
width
:
100%
;
width
:
100%
;
height
:
200rpx
;
height
:
200rpx
;
// background: url('../../static/index/test3.png') no-repeat;
background-size
:
100%
;
position
:
relative
;
position
:
relative
;
backdrop-filter
:
blur
(
10px
);
/* 背景模糊度为10像素 */
.imgBg
{
-webkit-backdrop-filter
:
blur
(
10px
);
/* Safari 和 Chrome 需要的前缀 */
width
:
100%
;
height
:
200rpx
;
filter
:
blur
(
16rpx
);
position
:
absolute
;
top
:
0
;
}
.containerBox
{
.containerBox
{
display
:
flex
;
display
:
flex
;
position
:
absolute
;
position
:
absolute
;
...
...
src/pages/index/index.vue
View file @
2201074b
...
@@ -63,7 +63,7 @@
...
@@ -63,7 +63,7 @@
<image
class=
"tou"
src=
"../../static/index/eat.png"
mode=
"widthFix"
/>
<image
class=
"tou"
src=
"../../static/index/eat.png"
mode=
"widthFix"
/>
<text
class=
""
>
附近人气美食
</text>
<text
class=
""
>
附近人气美食
</text>
</view>
</view>
<view
class=
"right"
>
<view
class=
"right"
@
tap=
"more"
>
<text
class=
""
>
立即查看
</text>
<text
class=
""
>
立即查看
</text>
<image
class=
"jian"
src=
"../../static/index/rightJ.png"
mode=
"widthFix"
/>
<image
class=
"jian"
src=
"../../static/index/rightJ.png"
mode=
"widthFix"
/>
</view>
</view>
...
@@ -239,6 +239,12 @@ const nearbyFood = () => {
...
@@ -239,6 +239,12 @@ const nearbyFood = () => {
foodNearbyData
.
value
=
res
.
data
.
content
;
foodNearbyData
.
value
=
res
.
data
.
content
;
});
});
};
};
// 附近美食查看更多
const
more
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/index/listFood?type=2'
,
});
};
// 轮播图
// 轮播图
const
rotatingBroadcast
=
()
=>
{
const
rotatingBroadcast
=
()
=>
{
groupImgList
().
then
((
res
)
=>
{
groupImgList
().
then
((
res
)
=>
{
...
@@ -347,7 +353,7 @@ const handleClick = (e) => {
...
@@ -347,7 +353,7 @@ const handleClick = (e) => {
const
index
=
e
.
index
;
const
index
=
e
.
index
;
if
(
index
===
0
)
{
if
(
index
===
0
)
{
xma
.
navigateTo
({
xma
.
navigateTo
({
url
:
'/pages/index/listFood'
,
url
:
'/pages/index/listFood
?type=1
'
,
});
});
}
}
};
};
...
...
src/pages/index/listFood.vue
View file @
2201074b
<
template
>
<
template
>
<view
class=
"container"
>
<view
class=
"container"
>
<view
class=
"head"
>
<view
class=
"head"
>
<view
class=
"top"
>
<view
class=
"top"
:style=
"
{ backgroundImage: topBg }"
>
<wd-icon
name=
"thin-arrow-left"
class=
"icon"
@
tap=
"back"
></wd-icon>
<wd-icon
name=
"thin-arrow-left"
class=
"icon"
@
tap=
"back"
></wd-icon>
</view>
</view>
<view
class=
"bootom"
>
<view
class=
"bootom"
>
...
@@ -68,12 +68,26 @@ import { merchantList } from '../../api/index';
...
@@ -68,12 +68,26 @@ import { merchantList } from '../../api/index';
onMounted
(()
=>
{
onMounted
(()
=>
{
getMerchantList
();
getMerchantList
();
});
});
onLoad
((
options
)
=>
{
const
{
type
}
=
options
;
console
.
log
(
'打印'
,
type
);
switch
(
type
)
{
case
'1'
:
topBg
.
value
=
'url(../../static/index/taste.png)'
;
break
;
case
'2'
:
topBg
.
value
=
'url(../../static/index/foodBg.png)'
;
break
;
}
});
const
business
=
reactive
([
'优选商家'
,
'超值半价'
,
'今日可订'
,
'经典单人'
]);
const
business
=
reactive
([
'优选商家'
,
'超值半价'
,
'今日可订'
,
'经典单人'
]);
const
active
=
ref
(
null
);
const
active
=
ref
(
null
);
const
rotate
=
ref
(
false
);
const
rotate
=
ref
(
false
);
const
rotate2
=
ref
(
false
);
const
rotate2
=
ref
(
false
);
const
rotate3
=
ref
(
false
);
const
rotate3
=
ref
(
false
);
const
topBg
=
ref
(
null
);
const
back
=
()
=>
{
const
back
=
()
=>
{
xma
.
navigateBack
({
xma
.
navigateBack
({
delta
:
1
,
delta
:
1
,
...
@@ -147,7 +161,7 @@ page {
...
@@ -147,7 +161,7 @@ page {
height
:
480rpx
;
height
:
480rpx
;
.top
{
.top
{
height
:
356rpx
;
height
:
356rpx
;
background
:
url('../../static/index/taste.png')
;
//
background: url('../../static/index/taste.png');
background-size
:
100%
100%
;
background-size
:
100%
100%
;
.icon
{
.icon
{
font-size
:
28rpx
;
font-size
:
28rpx
;
...
...
src/pages/packageDetails/packageDetails.vue
View file @
2201074b
...
@@ -3,11 +3,13 @@
...
@@ -3,11 +3,13 @@
<wd-popup
<wd-popup
v-model=
"showpopup"
v-model=
"showpopup"
position=
"bottom"
position=
"bottom"
custom-style=
"height: 50%;"
custom-style=
"height: 50%;
border-radius: 16rpx 16rpx 0 0 ;
"
@
close=
"handleClose"
@
close=
"handleClose"
:safe-area-inset-bottom=
"true"
:safe-area-inset-bottom=
"true"
custom-class=
"popup"
custom-class=
"popup"
></wd-popup>
>
<view
class=
"popup-content"
></view>
</wd-popup>
<!-- 轮播 -->
<!-- 轮播 -->
<view
class=
"swiper"
>
<view
class=
"swiper"
>
<wd-swiper
<wd-swiper
...
@@ -149,7 +151,8 @@
...
@@ -149,7 +151,8 @@
<!-- 底部 -->
<!-- 底部 -->
<view
class=
"bottom-operation-bar"
>
<view
class=
"bottom-operation-bar"
>
<view
class=
"start"
@
click=
"collectionFn"
>
<view
class=
"start"
@
click=
"collectionFn"
>
<image
src=
"@/static/shop/start.png"
></image>
<image
v-if=
"shopInfo.isCollect === 0"
src=
"@/static/shop/start.png"
></image>
<wd-icon
v-else
color=
"red"
name=
"star-on"
size=
"22px"
></wd-icon>
{{
shopInfo
.
privateIntFcount
}}
{{
shopInfo
.
privateIntFcount
}}
</view>
</view>
<view
class=
"start"
>
<view
class=
"start"
>
...
@@ -193,7 +196,9 @@ onShow(() => {
...
@@ -193,7 +196,9 @@ onShow(() => {
getLocationFn
();
getLocationFn
();
});
});
function
alert
()
{
function
alert
()
{
if
(
productCoupons
.
value
.
length
>
0
)
{
show
.
value
=
true
;
show
.
value
=
true
;
}
}
}
/**
/**
...
...
src/pages/shop/shop.vue
View file @
2201074b
...
@@ -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
);
...
@@ -515,6 +516,11 @@ const getEvaluationPageFn = () => {
...
@@ -515,6 +516,11 @@ const getEvaluationPageFn = () => {
}
}
});
});
};
};
function
back
()
{
xma
.
navigateBack
({
delta
:
1
,
});
}
function
refresh
()
{
function
refresh
()
{
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
params
.
value
=
{
params
.
value
=
{
...
...
src/pages/ticket/components/TicketList/index.vue
View file @
2201074b
...
@@ -225,8 +225,8 @@ const changeShowDetail = () => {
...
@@ -225,8 +225,8 @@ const changeShowDetail = () => {
}
}
.btn
{
.btn
{
width
:
10
0rpx
;
padding
:
2
0rpx
;
height
:
50rp
x
;
box-sizing
:
border-bo
x
;
border-radius
:
26rpx
;
border-radius
:
26rpx
;
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
...
...
src/static/index/foodBg.png
0 → 100644
View file @
2201074b
568 KB
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