chore(删除页面): 也门独立日(2025年12月5日上午10点结束)

This commit is contained in:
hzj 2025-12-25 12:07:18 +08:00
parent 7464476e65
commit 16f150cf14
6 changed files with 0 additions and 919 deletions

View File

@ -44,7 +44,6 @@ const RankingPage = [
const ACTIVITIES = [
'/recharge-reward', //充值奖励页面
'/Yemen-independence-day', //也门独立日
'/UAE-independence-day', //阿联酋独立日
]

View File

@ -395,12 +395,6 @@ const router = createRouter({
component: () => import('../views/Activities/UAE/IndependenceDay/index.vue'),
meta: { requiresAuth: true },
}, //2025年12月9日上午10点结束
{
path: '/Yemen-independence-day',
name: 'Yemen-independence-day',
component: () => import('../views/Activities/Yemen/IndependenceDay/index.vue'),
meta: { requiresAuth: true },
}, //2025年12月5日上午10点结束
],
})

View File

@ -62,7 +62,6 @@ const ACTIVITIES = [
'/lucky-champion', //幸运赢家
'/activity-game', //活动游戏页面
'/UAE-independence-day', //阿联酋独立日
'/Yemen-independence-day', //也门独立日
]
// 🎯 核心改变:基于身份的权限配置

View File

@ -413,7 +413,6 @@ class RouteGuard {
'/lucky-champion', //幸运赢家
'/activity-game', //活动游戏页面
'/UAE-independence-day', //阿联酋独立日
'/Yemen-independence-day', //也门独立日
]
const publicPages = [

View File

@ -1,196 +0,0 @@
<template>
<div style="width: 100%">
<div style="position: relative">
<img
v-smart-img
:src="BorderImgUrl"
alt=""
width="100%"
style="display: block; position: relative; z-index: 2"
/>
<!-- 头像 -->
<div
style="
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 1;
display: flex;
justify-content: center;
align-items: center;
"
:style="{ height: isTopOne ? '57%' : '48%' }"
>
<div :style="{ width: isTopOne ? '40%' : '48%' }">
<img
v-smart-img
:src="avatarUrl || ''"
alt=""
width="100%"
style="display: block; border-radius: 50%; aspect-ratio: 1/1; object-fit: cover"
@error="defaultAvatarUrl"
/>
</div>
</div>
<!-- 用户名和贡献值 -->
<div
style="
position: absolute;
bottom: 0;
left: 0;
right: 0;
z-index: 3;
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
"
:style="{ height: ranking == '1' ? '39%' : ranking == '2' ? '46%' : '46%' }"
>
<div
style="
height: 30%;
width: 50%;
display: flex;
justify-content: center;
align-items: center;
"
>
<div style="font-weight: 700" class="showText" :class="isTopOne ? 'top1Text' : 'text'">
{{ name }}
</div>
</div>
<div
style="
border-radius: 40px;
box-shadow: 0 0 2.558px 0 rgba(0, 0, 0, 0.4) inset;
border: 0.64px solid #ffdf36;
padding: 1px 2px;
display: flex;
justify-content: center;
align-items: center;
"
:style="{
width: ranking == '1' ? `55%` : ranking == '2' ? `55%` : `55%`,
background:
ranking == '1'
? `linear-gradient(270deg, #AD1300 0%, #FE280C 50%, #AD1300 100%)`
: ranking == '2'
? `linear-gradient(270deg, #A3FDF9 0%, #1D7BBD 50%, #A3FDF9 100%)`
: `linear-gradient(270deg, #F5EAE4 0%, #F9C29E 50%, #F5EAE4 100%)`,
}"
>
<img
v-smart-img
src="/src/assets/icon/coin.png"
alt=""
style="display: block"
:style="{ width: isTopOne ? '20%' : '20%' }"
/>
<div
style="font-weight: 590"
class="showText"
:class="isTopOne ? 'top1Text' : 'text'"
:style="{
color: ranking == '1' ? `#FFE601` : '#FFF',
}"
>
{{ distributionValue }}
</div>
</div>
</div>
</div>
</div>
</template>
<script setup>
const props = defineProps({
isTopOne: {
type: Boolean,
default: true,
},
avatarUrl: {
type: String,
default: '',
},
BorderImgUrl: {
type: String,
required: true,
},
name: {
type: String,
default: '',
},
distributionValue: {
type: String,
default: '',
},
ranking: {
type: String,
default: '1',
},
})
import defaultAvatar from '@/assets/icon/defaultAvatar.png'
const defaultAvatarUrl = (e) => {
console.log('头像资源出错')
e.target.onerror = null //
e.target.src = defaultAvatar
}
</script>
<style lang="scss" scoped>
* {
font-family: 'SF Pro';
color: black;
}
.showText {
color: #fff;
text-align: center;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.top1Text {
font-size: 0.75em;
}
.text {
font-size: 0.6em;
}
@media screen and (max-width: 360px) {
* {
font-size: 10px;
}
}
@media screen and (min-width: 360px) {
* {
font-size: 16px;
}
}
@media screen and (min-width: 768px) {
* {
font-size: 24px;
}
}
@media screen and (min-width: 1024px) {
* {
font-size: 32px;
}
}
</style>

View File

@ -1,714 +0,0 @@
<!-- src/views/Activities/Yemen/IndependenceDay/index.vue -->
<template>
<div class="fullPage">
<div class="bg" :style="{ '--bg-url': `url(${imageUrl('bg')})` }">
<!-- 状态栏占位区域仅在APP中显示 -->
<div v-if="isInAppEnvironment" style="height: 30px"></div>
<!-- 按钮 -->
<div style="margin-top: 106vw; display: flex; justify-content: flex-end; align-items: center">
<!-- 帮助按钮 -->
<img
v-smart-img
src="../../../../assets/icon/helpAct.png"
alt=""
style="display: block; position: relative; width: 10%; margin-right: 8px"
@click="maskLayerShow = true"
/>
</div>
<!-- 倒计时 -->
<div style="display: flex; justify-content: center; margin-top: 0vw">
<div style="width: 20%">
<itemCenter :imgUrl="imageUrl('timeBg')">
<div class="timeText" style="">{{ Days }}D</div>
</itemCenter>
</div>
<div class="timeText timeGap"></div>
<div style="width: 20%">
<itemCenter :imgUrl="imageUrl('timeBg')">
<div class="timeText" style="">{{ Hours }}</div>
</itemCenter>
</div>
<div class="timeText timeGap">:</div>
<div style="width: 20%">
<itemCenter :imgUrl="imageUrl('timeBg')">
<div class="timeText" style="">{{ Minutes }}</div>
</itemCenter>
</div>
<div class="timeText timeGap">:</div>
<div style="width: 20%">
<itemCenter :imgUrl="imageUrl('timeBg')">
<div class="timeText" style="">{{ Second }}</div>
</itemCenter>
</div>
</div>
<!-- 每周礼物 -->
<div style="display: flex; justify-content: center; margin-top: 10px">
<itemCenter :imgUrl="imageUrl('giftsBg')" :contentStyle="'paddingTop: 5%;'">
<div style="width: 85%; display: flex; justify-content: space-around; margin-top: 10%">
<div
v-for="(gift, index) in gifts"
:key="index"
style="width: 30%; display: flex; flex-direction: column"
>
<itemCenter :imgUrl="imageUrl('giftItemBg')">
<img
v-smart-img
:src="gift.giftPhoto"
alt=""
width="70%"
style="display: block; object-fit: cover"
/>
</itemCenter>
<div style="display: flex; justify-content: center; align-items: center; gap: 5px">
<img
v-smart-img
src="/src/assets/icon/coin.png"
alt=""
style="display: block; width: 25%; aspect-ratio: 1/1"
/>
<div style="color: rgba(255, 255, 255, 1); font-weight: 590">
{{ gift.giftCandy }}
</div>
</div>
</div>
</div>
</itemCenter>
</div>
<!-- 切换按钮 -->
<div style="display: flex; justify-content: space-around; margin-top: 2vw">
<!-- 排行榜按钮 -->
<div style="width: 40%; position: relative">
<img
v-smart-img
:src="imageUrl('rankingBt')"
alt=""
style="display: block; width: 100%"
:style="{ opacity: rankingShow ? 0 : 1 }"
@click="rankingShow = true"
/>
<img
v-smart-img
:src="imageUrl('rankingBtActive')"
alt=""
style="display: block; width: 100%; position: absolute; top: 0; left: 0"
:style="{ opacity: rankingShow ? 1 : 0 }"
@click="rankingShow = true"
/>
</div>
<!-- 奖励按钮 -->
<div style="width: 40%; position: relative">
<img
v-smart-img
:src="imageUrl('rewardsBt')"
alt=""
style="display: block; width: 100%"
:style="{ opacity: rankingShow ? 1 : 0 }"
@click="rankingShow = false"
/>
<img
v-smart-img
:src="imageUrl('rewardBtActive')"
alt=""
style="display: block; width: 100%; position: absolute; top: 0; left: 0"
:style="{ opacity: rankingShow ? 0 : 1 }"
@click="rankingShow = false"
/>
</div>
</div>
<!-- 展示内容 -->
<div>
<!-- Ranking -->
<div v-show="rankingShow" style="position: relative; width: 100%">
<!-- 背景图 -->
<div
class="ranking-bg"
:style="{ '--ranking-bg-url': `url(${imageUrl('RankingBg')})` }"
></div>
<div style="position: relative; z-index: 1">
<!-- 前三名 -->
<itemCenter
:imgUrl="imageUrl('RankingMain')"
:contentStyle="`padding: 20% 5% 0;flex-direction: column;`"
>
<div>
<!-- 第一 -->
<div style="display: flex; justify-content: center">
<TopUser
:BorderImgUrl="imageUrl('topOne')"
:avatarUrl="RankingHasTop3[0].avatar"
:name="RankingHasTop3[0].nickname"
:distributionValue="RankingHasTop3[0].quantity"
style="width: 45%"
@click="viewUserInfo(RankingHasTop3[0].userId)"
/>
</div>
<!-- 第二三 -->
<div style="display: flex; justify-content: space-between; margin-top: -40%">
<TopUser
:isTopOne="false"
ranking="2"
:BorderImgUrl="imageUrl('topTwo')"
:avatarUrl="RankingHasTop3[1].avatar"
:name="RankingHasTop3[1].nickname"
:distributionValue="RankingHasTop3[1].quantity"
style="width: 30%"
@click="viewUserInfo(RankingHasTop3[1].userId)"
/>
<TopUser
:isTopOne="false"
ranking="3"
:BorderImgUrl="imageUrl('topThree')"
:avatarUrl="RankingHasTop3[2].avatar"
:name="RankingHasTop3[2].nickname"
:distributionValue="RankingHasTop3[2].quantity"
style="width: 30%"
@click="viewUserInfo(RankingHasTop3[2].userId)"
/>
</div>
</div>
</itemCenter>
<!-- 第四名开始 -->
<div v-if="showRanking.length > 0" style="margin-bottom: 6vw">
<itemCenter
v-for="(listItem, index) in showRanking"
:key="listItem.userId"
:imgUrl="imageUrl('RankingItem')"
:contentStyle="`padding: 0 10%`"
:lazy="true"
:immediate="index < 2"
@click="viewUserInfo(listItem.userId)"
>
<!-- 基本信息 -->
<div
style="
flex: 1;
min-width: 0;
display: flex;
justify-content: space-around;
align-items: center;
gap: 4px;
"
>
<!-- 排名 -->
<div style="color: #edb247; font-weight: 700">
{{ listItem?.rank }}
</div>
<!-- 头像 -->
<img
v-smart-img
:src="listItem?.avatar || ''"
alt=""
style="
display: block;
width: 3.5em;
margin: 0 2%;
aspect-ratio: 1/1;
border-radius: 50%;
object-fit: cover;
"
@error="handleAvatarImageError"
/>
<!-- 名称id -->
<div style="flex: 1; min-width: 0; display: flex; flex-direction: column">
<div
style="
color: #fff;
font-weight: 860;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
"
class="UserNickname"
>
{{ listItem?.nickname }}
</div>
<div style="color: #fff; font-weight: 590" class="UserNickname">
{{ $t('user_id_prefix') }} {{ listItem?.account }}
</div>
</div>
</div>
<!-- 贡献值 -->
<div
style="
width: auto;
min-width: 0;
display: flex;
align-items: center;
"
>
<img
v-smart-img
src="/src/assets/icon/coin.png"
alt=""
style="display: block; width: 1.5em; aspect-ratio: 1/1; object-fit: cover"
/>
<div style="color: #edb247; font-weight: 700" class="UserNickname">
{{ listItem?.quantity }}
</div>
</div>
</itemCenter>
</div>
<!-- 底框 -->
<img
v-smart-img
:src="imageUrl('RankingBottomBorder')"
alt=""
width="100%"
style="display: block; margin-top: -22vw; position: relative; z-index: 9"
/>
</div>
</div>
<!-- Rewards -->
<div
v-show="!rankingShow"
style="display: flex; flex-direction: column; align-items: center"
>
<div
v-for="(rewardsTop, top) in rewardsList"
:key="top"
style="position: relative; width: 100%; margin: 10px 0"
>
<itemCenter
:imgUrl="topImg[Number(rewardsTop.rankRange) - 1]"
:contentStyle="`display: grid;grid-template-columns: repeat(2, 1fr);gap: 12px;padding: 20vw 8vw 8vw;`"
>
<div
v-for="(reward, rewardIndex) in rewardsTop.rewards"
:key="rewardIndex"
style="width: 100%"
>
<itemCenter :imgUrl="imageUrl('giftItemBg')">
<img
v-smart-img
:src="reward.cover || ''"
alt=""
width="70%"
style="display: block; object-fit: cover"
@error="(e) => handleRewardImageError(e, reward.type)"
/>
</itemCenter>
<div class="valueBg" :style="{ '--value-bg-url': `url(${imageUrl('valueBg')})` }">
<div
style="
text-align: center;
font-size: 1.2em;
font-weight: 900;
font-style: italic;
background: linear-gradient(
90deg,
#fff677 6.36%,
#d39f1e 26%,
#fff891 49.56%,
#ffc93e 70.51%,
#ffc 93.64%
);
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
"
>
{{ showDetail(reward.type, reward) }}
</div>
</div>
</div>
</itemCenter>
</div>
</div>
</div>
<!-- 我的排名占位 -->
<div style="height: 25vw"></div>
<!-- 我的排名 -->
<itemCenter
style="position: fixed; bottom: 0; z-index: 2"
:imgUrl="imageUrl('myRankingBg')"
:contentStyle="`padding: 2% 7% 0`"
>
<!-- 基本信息 -->
<div
style="
flex: 1;
min-width: 0;
display: flex;
justify-content: space-around;
align-items: center;
gap: 8px;
"
>
<!-- 排名 -->
<div style="color: #edb247; font-weight: 700">
{{ myRanking.rank || 999 }}
</div>
<!-- 头像 -->
<img
v-smart-img
:src="myRanking.avatar || ''"
alt=""
style="
display: block;
width: 4em;
aspect-ratio: 1/1;
border-radius: 50%;
object-fit: cover;
"
@error="handleAvatarImageError"
/>
<!-- 名称 -->
<div style="flex: 1; min-width: 0; display: flex; flex-direction: column">
<div
style="
color: #fff;
font-weight: 860;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
"
class="UserNickname"
>
{{ myRanking.nickname }}
</div>
</div>
</div>
<!-- 贡献值 -->
<div
style="
width: auto;
min-width: 0;
display: flex;
align-items: center;
"
>
<img
v-smart-img
src="/src/assets/icon/coin.png"
alt=""
style="display: block; width: 1.5em; aspect-ratio: 1/1; object-fit: cover"
/>
<div style="color: #edb247; font-weight: 700">
{{ myRanking.quantity || 0 }}
</div>
</div>
</itemCenter>
<!-- 弹窗遮罩层 -->
<maskLayer :maskLayerShow="maskLayerShow" @click="maskLayerShow = false">
<!-- help弹窗 -->
<div style="margin: 20% 0" @click.stop>
<img v-smart-img :src="imageUrl('helpInfo')" alt="" style="display: block; width: 100%" />
</div>
</maskLayer>
</div>
</div>
</template>
<script setup>
import { computed, onMounted, onUnmounted, ref } from 'vue'
import { isInApp, viewUserInfo } from '@/utils/appBridge.js'
import { connectToApp } from '@/utils/appConnector.js'
import { getPngUrl } from '@/config/imagePaths.js'
import { preloadImages } from '@/utils/imagePreloader.js'
import { handleAvatarImageError, handleRewardImageError } from '@/utils/imageHandler.js'
import { getThisWeekRewardsAndGifts, getRankingListAndMyRanking } from '@/api/activity.js'
import itemCenter from '@/components/itemCenter.vue'
import TopUser from './components/topUser.vue'
import maskLayer from '@/components/MaskLayer.vue'
// OSSURL
const imageUrl = (filename) => getPngUrl('Activities/Yemen/IndependenceDay/', filename)
const isInAppEnvironment = ref(false) // APP
const maskLayerShow = ref(false) //
//
const Days = ref(0)
const Hours = ref(0)
const Minutes = ref(0)
const Second = ref(0)
let timer = null
//
const rankingShow = ref(true) //
const Ranking = ref([]) //
const myRanking = ref({}) //
const rewardsList = ref([]) //
const gifts = ref([]) //
const topImg = ref([imageUrl('top1RewardBg'), imageUrl('top2RewardBg'), imageUrl('top3RewardBg')]) // top
// 3
const RankingHasTop3 = computed(() => {
let RankingShow = [...Ranking.value]
if (Ranking.value.length < 3) {
let addNullUser = Array.from({ length: 3 - Ranking.value.length }, () => ({
avatar: '',
nickname: '',
quantity: '',
}))
RankingShow.push(...addNullUser)
}
return RankingShow
})
//
const showRanking = computed(() => {
return Ranking.value.filter((_, index) => index >= 3)
})
// 202512510
const getTargetTime = () => {
const targetDate = new Date(2025, 11, 5, 10, 0, 0) // 01112
return targetDate.getTime()
}
const targetTime = ref(getTargetTime())
//
const formatTime = (value) => {
return value < 10 ? `0${value}` : value
}
//
const getCountdown = () => {
const now = Date.now()
let diff = targetTime.value - now
//
if (diff <= 0) {
Days.value = 0
Hours.value = '00'
Minutes.value = '00'
Second.value = '00'
//
if (timer) {
clearInterval(timer)
timer = null
}
return
}
const totalSeconds = Math.floor(diff / 1000)
Days.value = Math.floor(totalSeconds / (24 * 3600))
Hours.value = formatTime(Math.floor((totalSeconds % (24 * 3600)) / 3600))
Minutes.value = formatTime(Math.floor((totalSeconds % 3600) / 60))
Second.value = formatTime(Math.floor(totalSeconds % 60))
}
//
const showDetail = (type, reward) => {
let showamount = ['GOLD', 'DIAMOND', 'GIFT', 'FRAGMENTS']
if (showamount.includes(type)) {
return reward.content
} else {
return `${reward.quantity}Days`
}
}
//
const getListAndMy = async () => {
let data = {
activityType: 6,
}
const resMyWeekStarRanking = await getRankingListAndMyRanking(data)
console.log('resMyWeekStarRanking:', resMyWeekStarRanking)
if (resMyWeekStarRanking.status && resMyWeekStarRanking.body) {
myRanking.value = resMyWeekStarRanking.body.currentUserRank
Ranking.value = resMyWeekStarRanking.body.rankingList
}
}
//
const getRewardsAndGifts = async () => {
const resRewardsAndGifts = await getThisWeekRewardsAndGifts('1993999223813906433')
if (resRewardsAndGifts.status && resRewardsAndGifts.body) {
gifts.value = resRewardsAndGifts.body.gifts
rewardsList.value = resRewardsAndGifts.body.butOneRewards
}
}
//
const initData = () => {
getListAndMy() //
getRewardsAndGifts() //
}
//
const preloadCriticalImages = () => {
const criticalImages = [
imageUrl('bg'),
imageUrl('timeBg'),
imageUrl('rankingBt'),
imageUrl('rankingBtActive'),
imageUrl('rewardBtActive'),
imageUrl('rewardsBt'),
imageUrl('RankingMain'),
imageUrl('RankingBg'),
imageUrl('topOne'),
imageUrl('topTwo'),
imageUrl('topThree'),
imageUrl('RankingItem'),
imageUrl('RankingBottomBorder'),
imageUrl('myRankingBg'),
imageUrl('helpInfo'),
imageUrl('top1RewardBg'),
imageUrl('top2RewardBg'),
imageUrl('top3RewardBg'),
imageUrl('giftItemBg'),
imageUrl('giftsBg'),
imageUrl('valueBg'),
]
preloadImages(criticalImages)
}
// 使APP
const connectToAppHandler = async () => {
await connectToApp(() => {
//
initData() //
preloadCriticalImages() //
})
}
//
onMounted(() => {
connectToAppHandler()
isInAppEnvironment.value = isInApp()
getCountdown()
timer = setInterval(getCountdown, 1000) //
})
onUnmounted(() => {
clearInterval(timer) //
})
</script>
<style lang="scss" scoped>
* {
color: #fff;
font-family: 'SF Pro';
}
.fullPage {
position: relative;
background: #460001;
}
.bg {
width: 100vw;
min-height: 100vh;
background-image: var(--bg-url);
background-size: 100% auto;
background-repeat: no-repeat;
position: relative;
z-index: 1;
}
.valueBg {
background-image: var(--value-bg-url);
background-size: auto 100%;
background-repeat: no-repeat;
background-position: center center;
position: relative;
}
.timeText {
color: #fff;
font-weight: 590;
font-size: 1.5em;
margin-bottom: 1vw;
}
.timeGap {
width: 6px;
align-self: stretch;
display: flex;
justify-content: center;
align-items: center;
}
.ranking-bg {
background-color: linear-gradient(180deg, #7c0101 0%, #400000 100%), #d9d9d9;
background-image: var(--ranking-bg-url);
background-size: 100% auto;
background-repeat: no-repeat;
position: absolute;
inset: 10vw 2% 1vw;
z-index: 1;
}
.btTitle {
color: #fff;
font-weight: 700;
}
.topTitle {
font-size: 1.5em;
}
.history-name {
font-size: 0.8em;
}
.history-time {
font-size: 0.8em;
}
.UserNickname {
font-size: 0.8em;
}
@media screen and (max-width: 360px) {
* {
font-size: 10px;
}
}
@media screen and (min-width: 360px) {
* {
font-size: 14px;
}
}
@media screen and (min-width: 768px) {
* {
font-size: 24px;
}
}
@media screen and (min-width: 1024px) {
* {
font-size: 32px;
}
}
</style>