Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
corporateCulture-qd
Overview
Overview
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
王立鹏
corporateCulture-qd
Commits
09c41c2a
Commit
09c41c2a
authored
Mar 04, 2026
by
lijiabin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【需求 20331】 feat: 完成每日抽奖内容
parent
d45e0829
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
16 deletions
+38
-16
index.vue
src/views/homePage/index.vue
+38
-16
No files found.
src/views/homePage/index.vue
View file @
09c41c2a
...
...
@@ -273,41 +273,60 @@
<h1
class=
"text-sm sm:text-base font-bold"
>
每日抽奖
</h1>
</div>
<div
class=
"flex items-center gap-3 min-w-0"
>
<div
class=
"flex items-center gap-3 min-w-0 p-3 rounded-lg bg-white/60 border border-amber-100"
>
<el-image
class=
"
h-20 rounded-lg
"
class=
"
w-18 h-18 rounded-lg flex-shrink-0 shadow-sm
"
:src=
"lotteryPrizesDetail.prizesImg"
fit=
"cover"
:preview-src-list=
"[lotteryPrizesDetail.prizesImg]"
/>
<div
class=
"flex flex-col min-w-0"
>
<div
class=
"font-semibold truncate mb-1"
>
奖品名称:
{{
lotteryPrizesDetail
.
prizesName
}}
<div
class=
"flex flex-col min-w-0 gap-1"
>
<div
class=
"font-semibold text-sm truncate"
>
{{
lotteryPrizesDetail
.
prizesName
}}
</div>
<div
class=
"text-13px text-gray-500 truncate tracking-wider"
>
参与费用:
{{
lotteryPrizesDetail
.
registrationFee
}}
YA币
</div>
<div
class=
"text-13px text-gray-500 truncate tracking-wider"
>
今日参与:
{{
lotteryPrizesDetail
.
number
}}
人
<div
class=
"text-12px text-gray-500 flex items-center gap-1"
>
<svg-icon
name=
"small_coin"
size=
"14"
/>
<span>
{{
lotteryPrizesDetail
.
registrationFee
}}
YA币
</span>
</div>
<div
class=
"text-12px text-gray-400"
>
今日
{{
lotteryPrizesDetail
.
number
}}
人参与
</div>
</div>
</div>
<div
class=
"text-sm text-gray-500 my-2"
v-if=
"lotteryPrizesDetail.winner"
>
恭喜昨日中奖者
{{
lotteryPrizesDetail
.
winner
}}
<div
v-if=
"lotteryPrizesDetail.winner"
class=
"text-xs text-amber-600 mt-2 px-1 truncate"
>
昨日中奖:
{{
lotteryPrizesDetail
.
winner
}}
</div>
<div
class=
"flex justify-center items-center mt-3"
>
<el-button
class=
"w-80%! bg-[linear-gradient(to_right,#FFD06A_0%,#FFB143_100%)] shadow-[0px_1px_8px_0_rgba(255,173,91,0.25)] border-none hover:-translate-y-1 hover:shadow-[0px_4px_10px_0_rgba(255,173,91,0.4)] hover:scale-105 active:scale-95 active:translate-y-0 transition-all duration-200 flex-1 text-xs sm:text-sm text-#333!"
v-if=
"!lotteryPrizesDetail.isJoin"
class=
"w-full! border-none! transition-all duration-200 text-xs sm:text-sm bg-[linear-gradient(to_right,#FFD06A_0%,#FFB143_100%)]! text-#333! shadow-[0px_1px_8px_0_rgba(255,173,91,0.25)] hover:-translate-y-0.5 hover:shadow-[0px_4px_10px_0_rgba(255,173,91,0.4)] active:translate-y-0"
type=
"primary"
@
click=
"handleLottery"
>
<svg-icon
name=
"daily_lottery"
size=
"18"
class=
"mr-
2 mb-
1"
/>
<svg-icon
name=
"daily_lottery"
size=
"18"
class=
"mr-1"
/>
参与抽奖
</el-button>
<div
v-else
class=
"w-full text-center py-2 rounded-md bg-amber-50 border border-amber-200 border-dashed text-amber-400 text-xs sm:text-sm"
>
✓ 今日已参与
</div>
</div>
</div>
<!-- 大转盘 -->
<!--
<div
class=
"lottery-container common-box rounded-lg bg-#F5F0FF"
>
<div
class=
"flex items-center gap-2 mb-4"
>
<div
class=
"w-1 h-4 bg-gradient-to-b from-violet-500 to-purple-500 rounded-full"
></div>
<h1
class=
"text-sm sm:text-base font-bold"
>
大转盘
</h1>
</div>
<div
class=
"flex justify-center"
>
<LuckyWheel
/>
</div>
</div>
-->
</div>
</div>
...
...
@@ -346,6 +365,7 @@ import { TABS_REF_KEY, levelListOptions } from '@/constants'
import
{
useScrollTop
}
from
'@/hooks'
import
{
useQuestionStore
}
from
'@/stores/question'
import
{
storeToRefs
}
from
'pinia'
// import LuckyWheel from '@/components/common/LuckyWheel/index.vue'
const
route
=
useRoute
()
const
router
=
useRouter
()
...
...
@@ -461,6 +481,8 @@ const getLotteryPrizesDetail = async () => {
}
// 参与抽奖
const
handleLottery
=
async
()
=>
{
if
(
!
lotteryPrizesDetail
.
value
?.
inRegistrationTime
)
return
ElMessage
.
error
(
`抽奖通道将于
${
lotteryPrizesDetail
.
value
?.
registrationTimeDesc
}
开启
`)
await userJoinLottery()
getLotteryPrizesDetail()
refreshUserAccountData()
...
...
@@ -508,7 +530,7 @@ const publishTopic = () => {
const handleClickCarousel = (item: CarouselItemDto) => {
if (item.url) {
window
.
open
(
item
.
url
)
router.push
(item.url)
}
}
...
...
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