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
d1257955
Commit
d1257955
authored
Aug 20, 2024
by
陈宗胤(贵阳日报)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
css和逻辑调整
parent
476c26af
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
24 deletions
+35
-24
FoodDetails.vue
src/Components/index/FoodDetails.vue
+1
-1
ShopCard.vue
src/Components/index/ShopCard.vue
+2
-2
index.vue
src/pages/index/index.vue
+32
-21
No files found.
src/Components/index/FoodDetails.vue
View file @
d1257955
<
template
>
<view
@
tap=
"toShop(item.shopId)"
class=
"card"
v-for=
"item in cardData"
:key=
"item.shopId"
>
<image
class=
"img"
:src=
"item.shopLogo"
mode=
"
aspect
Fill"
/>
<image
class=
"img"
:src=
"item.shopLogo"
mode=
"
scaleTo
Fill"
/>
<view
class=
"right"
>
<text
class=
"text"
>
{{
item
.
shopName
}}
</text>
<view
class=
"twoBxo"
>
...
...
src/Components/index/ShopCard.vue
View file @
d1257955
<
template
>
<view
class=
"card"
>
<view
class=
"head"
>
<image
class=
"imgBg"
:src=
"shopCardData.shopLogo"
mode=
"
aspect
Fill"
/>
<image
class=
"imgBg"
:src=
"shopCardData.shopLogo"
mode=
"
scaleTo
Fill"
/>
<view
class=
"containerBox"
>
<image
class=
"img"
:src=
"shopCardData.shopLogo"
mode=
"
aspect
Fill"
/>
<image
class=
"img"
:src=
"shopCardData.shopLogo"
mode=
"
scaleTo
Fill"
/>
<view
class=
"right"
>
<text
class=
"text"
>
{{
shopCardData
.
shopName
}}
</text>
<view
class=
"twoBxo"
>
...
...
src/pages/index/index.vue
View file @
d1257955
...
...
@@ -38,22 +38,25 @@
<!-- 红包 -->
<view
class=
"redEnvelope"
>
<view
class=
"title"
>
今日福利
</view>
<scroll-view
class=
"box-red"
scroll-x=
"true"
@
scroll=
"scroll"
>
<view
class=
"redBagBox"
v-for=
"(item, index) in coupon"
:key=
"index"
>
<!--
<scroll-view
class=
"box-red"
scroll-x=
"true"
@
scroll=
"scroll"
>
-->
<view
class=
"box-red"
>
<view
class=
"redBagBox"
v-for=
"(item, index) in coupon"
:key=
"index"
@
tap=
"receive(item)"
>
<view
class=
"content"
>
<text
class=
"textO"
>
{{
item
.
activityName
}}
</text>
<text
class=
"textW"
>
¥
{{
item
.
discountValue
}}
</text>
<text
class=
"textO"
>
满
{{
item
.
thresholdAmount
}}
减
{{
item
.
discountValue
}}
</text>
</view>
<view
v-if=
"item.numState === 0"
class=
"textF"
@
tap=
"receive(item)"
>
领取
</view>
<view
v-if=
"item.numState === 0"
class=
"textF"
>
领取
</view>
<view
v-else
class=
"textF"
@
tap=
"toUse(item)"
>
去使用
</view>
</view>
</scroll-view>
<image
</view>
<!--
</scroll-view>
-->
<!--
<image
@
tap=
"toCoupon"
class=
"discount"
src=
"../../static/index/discount.png"
mode=
"widthFix"
/>
/>
-->
</view>
<!-- 贵阳老味道 -->
<!--
<view
class=
"guiyang"
></view>
-->
...
...
@@ -87,7 +90,7 @@
:key=
"index"
>
<!--
<image
class=
"img"
src=
"../../static/index/eatFood.png"
mode=
"widthFix"
/>
-->
<image
class=
"img"
:src=
"item.shopLogo"
mode=
"
aspect
Fill"
/>
<image
class=
"img"
:src=
"item.shopLogo"
mode=
"
scaleTo
Fill"
/>
<text
class=
"one"
>
{{
item
.
shopName
}}
</text>
<view
class=
"price"
>
<text
class=
"two"
>
{{
item
.
grade
}}
推荐
</text>
...
...
@@ -273,7 +276,7 @@ const toSearch = (res) => {
// 获取优惠券
const
getCouponMainList
=
()
=>
{
couponMainList
().
then
((
res
)
=>
{
coupon
.
value
=
res
.
data
.
records
.
slice
(
0
,
10
);
coupon
.
value
=
res
.
data
.
records
.
slice
(
0
,
4
);
});
};
// 领取优惠券
...
...
@@ -281,19 +284,27 @@ const receive = (data) => {
if
(
data
.
couponType
===
'mch'
&&
data
.
numState
===
0
)
{
receiveCoupon
([
data
.
couponYzfId
]).
then
((
res
)
=>
{
data
.
numState
=
1
;
xma
.
showToast
({
title
:
'领取成功!'
,
icon
:
'none'
,
xma
.
navigateTo
({
url
:
`/pages/ticket/detail?shopId=
${
data
.
activityCode
}
`
,
});
});
}
else
if
(
data
.
couponType
===
'mch'
&&
data
.
numState
===
1
)
{
xma
.
navigateTo
({
url
:
`/pages/ticket/detail?shopId=
${
data
.
activityCode
}
`
,
});
}
else
if
(
data
.
couponType
===
'yzf'
)
{
xma
.
showToast
({
title
:
'请前往或下载翼支付APP领取或使用'
,
icon
:
'none'
,
});
}
};
// TO优惠券详情
const
toCoupon
=
()
=>
{
xma
.
navigateTo
({
url
:
'/pages/index/coupon'
,
});
};
//
const toCoupon = () => {
//
xma.navigateTo({
//
url: '/pages/index/coupon',
//
});
//
};
// 获取分类
const
getClassification
=
()
=>
{
groupBuyList
().
then
((
res
)
=>
{
...
...
@@ -654,7 +665,7 @@ page {
.title
{
font-family
:
YouSheBiaoTiHei
,
YouSheBiaoTiHei
;
font-weight
:
bold
;
font-size
:
2
8
rpx
;
font-size
:
2
6
rpx
;
color
:
#3d3d3d
;
line-height
:
28rpx
;
text-shadow
:
2px
2px
0px
rgba
(
255
,
255
,
255
,
0
.36
);
...
...
@@ -664,9 +675,9 @@ page {
.box-red
{
padding
:
10rpx
0
0
20rpx
;
box-sizing
:
border-box
;
w
hite-space
:
nowrap
;
width
:
80%
;
z-index
:
-1
;
w
idth
:
100%
;
display
:
flex
;
justify-content
:
space-evenly
;
.redBagBox
{
margin-right
:
8rpx
;
width
:
124rpx
;
...
...
@@ -687,7 +698,7 @@ page {
align-items
:
center
;
justify-content
:
center
;
.textO
{
width
:
1
24
rpx
;
width
:
1
00
rpx
;
font-size
:
12rpx
;
color
:
#fa5151
;
text-align
:
center
;
...
...
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