Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
25d95f93
Commit
25d95f93
authored
Sep 08, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lottery
parent
4f7e7e1a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
18 deletions
+14
-18
lottery.vue
activity0915/lottery/lottery.vue
+14
-18
No files found.
activity0915/lottery/lottery.vue
View file @
25d95f93
...
...
@@ -181,12 +181,7 @@ const recentNotices = computed(() => {
if
(
winningCarousel
.
value
.
length
>
0
)
{
notices
=
winningCarousel
.
value
.
slice
(
0
,
20
);
}
else
{
// 如果没有API数据,显示默认公告
notices
=
[
{
userNickname
:
'用户152****8839'
,
prizeName
:
'XXXXXX'
},
{
userNickname
:
'用户138****5678'
,
prizeName
:
'YYYYYY'
},
{
userNickname
:
'用户159****1234'
,
prizeName
:
'ZZZZZZ'
}
];
}
// 如果只有1条数据,复制成3条以确保轮播效果
...
...
@@ -307,10 +302,10 @@ const loadLotteryInfo = async () => {
// 启动公告轮播(无论是否有API数据)
startNoticeCarousel
()
}
else
{
uni
.
showToast
({
title
:
response
.
msg
||
'获取抽奖信息失败'
,
icon
:
'none'
})
//
uni.showToast({
//
title: response.msg || '获取抽奖信息失败',
//
icon: 'none'
//
})
// 即使API失败也启动轮播
startNoticeCarousel
()
}
...
...
@@ -396,6 +391,7 @@ const handleDrawClick = async () => {
// 根据接口返回的prizeId找到对应的奖品索引
const
prizeIndex
=
turntablePrizes
.
value
.
findIndex
(
prize
=>
prize
.
prizeId
===
response
.
data
.
prizeId
)
console
.
warn
(
"prizeIndex"
,
prizeIndex
)
if
(
prizeIndex
!==
-
1
)
{
// 开始轮流亮起效果
startHighlightAnimation
(
prizeIndex
,
response
.
data
.
isWin
)
...
...
@@ -491,10 +487,10 @@ const handleDrawSucModalClose = () => {
const
handleHappyGet
=
()
=>
{
console
.
log
(
'点击开心领取'
)
showDrawSucModal
.
value
=
false
uni
.
showToast
({
title
:
'奖品领取成功'
,
icon
:
'success'
})
//
uni.showToast({
//
title: '奖品领取成功',
//
icon: 'success'
//
})
}
// 抽奖失败弹窗关闭处理
...
...
@@ -506,10 +502,10 @@ const handleDrawFailModalClose = () => {
const
handleIKnow
=
()
=>
{
console
.
log
(
'点击我知道了'
)
showDrawFailModal
.
value
=
false
uni
.
showToast
({
title
:
'下次再来试试吧'
,
icon
:
'none'
})
//
uni.showToast({
//
title: '下次再来试试吧',
//
icon: 'none'
//
})
}
// 生命周期
...
...
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