Commit 6f7a565b by lijiabin

【需求 20520】 feat: 所有活动都不开放仓库

parent cf3e0b43
......@@ -56,6 +56,7 @@
</RewardButton>
<div
v-if="!isWareHouse"
class="group flex items-center cursor-pointer px-2 py-1 sm:px-3 sm:py-2 rounded-lg transition-all duration-200 hover:shadow-lg hover:bg-white/60"
@click="router.push('/auction')"
>
......@@ -175,6 +176,7 @@ const userStore = useUserStore()
const activityStore = useActivityStore()
const { userInfo } = storeToRefs(userStore)
const isWareHouse = userInfo.value.address.includes('仓库')
const router = useRouter()
const route = useRoute()
......
......@@ -298,73 +298,87 @@
</transition>
</div>
</div>
<!-- 每日抽奖 -->
<div v-if="lotteryPrizesDetail" class="lottery-container common-box rounded-lg bg-#FFF7E6">
<div class="flex items-center gap-2 mb-3">
<div class="w-1 h-4 bg-gradient-to-b from-amber-400 to-orange-400 rounded-full"></div>
<h1 class="text-sm sm:text-base font-bold">每日抽奖</h1>
</div>
<template v-if="!isWareHouse">
<!-- 每日抽奖 -->
<div
class="flex items-center gap-3 min-w-0 p-3 rounded-lg bg-white/60 border border-amber-100"
v-if="lotteryPrizesDetail"
class="lottery-container common-box rounded-lg bg-#FFF7E6"
>
<el-image
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 gap-1">
<div class="font-semibold text-sm truncate">
{{ lotteryPrizesDetail.prizesName }}
</div>
<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 class="flex items-center gap-2 mb-3">
<div class="w-1 h-4 bg-gradient-to-b from-amber-400 to-orange-400 rounded-full"></div>
<h1 class="text-sm sm:text-base font-bold">每日抽奖</h1>
</div>
</div>
<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
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"
<div
class="flex items-center gap-3 min-w-0 p-3 rounded-lg bg-white/60 border border-amber-100"
>
<svg-icon name="daily_lottery" size="18" class="mr-1" />
参与抽奖
</el-button>
<el-image
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 gap-1">
<div class="font-semibold text-sm truncate">
{{ lotteryPrizesDetail.prizesName }}
</div>
<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
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"
v-if="lotteryPrizesDetail.winner"
class="text-xs text-amber-600 mt-2 px-1 truncate"
>
✓ 今日已参与
昨日中奖:{{ lotteryPrizesDetail.winner }}
</div>
</div>
</div>
<!-- 大转盘 -->
<div
v-if="wheelConfig?.isActivityActive"
class="lottery-container common-box rounded-lg bg-#F5F0FF"
>
<div class="flex items-center gap-2 xl: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">
<LuckyWheelContainer :wheelConfig="wheelConfig" />
<div class="flex justify-center items-center mt-3">
<el-button
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-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="flex items-center justify-center text-sm text-gray-500 xl:mt-4 px-1 truncate">
每次抽奖{{ wheelConfig?.costYaCoin }} YA币
<!-- 大转盘 -->
<div
v-if="wheelConfig?.isActivityActive"
class="lottery-container common-box rounded-lg bg-#F5F0FF"
>
<div class="flex items-center gap-2 xl: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">
<LuckyWheelContainer :wheelConfig="wheelConfig" />
</div>
<div
class="flex items-center justify-center text-sm text-gray-500 xl:mt-4 px-1 truncate"
>
每次抽奖{{ wheelConfig?.costYaCoin }} YA币
</div>
</div>
</div>
</template>
</div>
</div>
......@@ -410,8 +424,11 @@ import { useBreakpoints, breakpointsTailwind } from '@vueuse/core'
import LuckyWheelContainer from '@/components/common/LuckyWheelContainer/index.vue'
import { RewardButtonEnum } from '@/constants'
import RewardButton from '@/components/common/RewardButton/index.vue'
import { useTourStore } from '@/stores'
import { useTourStore, useUserStore } from '@/stores'
const userStore = useUserStore()
const { userInfo } = storeToRefs(userStore)
const isWareHouse = userInfo.value.address.includes('仓库')
const tourStore = useTourStore()
const { shouldShowAskTabTour } = storeToRefs(tourStore)
const breakpoints = useBreakpoints(breakpointsTailwind)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment