chore(删除活动及其图片): 巴勒斯坦独立日

This commit is contained in:
hzj 2025-12-03 11:12:23 +08:00
parent 081b75f969
commit 4a8a008868
21 changed files with 0 additions and 897 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 367 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 310 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 387 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 KiB

View File

@ -1,226 +0,0 @@
<template>
<div style="width: 100%">
<div style="position: relative">
<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 ? '43%' : '46%' }"
>
<div :style="{ width: isTopOne ? '40%' : '45%' }">
<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' ? '77%' : ranking == '2' ? '74%' : '77%' }"
>
<div
style="
height: 30%;
width: 50%;
display: flex;
justify-content: center;
align-items: center;
"
>
<div
style="
font-weight: 860;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
"
class="showText"
:class="isTopOne ? 'top1Text' : 'text'"
:style="{
backgroundImage:
ranking == '1'
? `radial-gradient(141.42% 141.42% at 0% 0%, #B77C44 0%, #FEE5BB 21.88%, #BF854A 42.19%, #FCDFB3 60.94%, #C0864B 79.17%, #FBE8D4 100%)`
: ranking == '2'
? `radial-gradient(141.42% 141.42% at 0% 0%, #449EB7 0%, #BBF5FE 21.88%, #4A9EBF 42.19%, #B3E6FC 60.94%, #4BA3C0 79.17%, #D4E9FB 100%)`
: `radial-gradient(141.42% 141.42% at 0% 0%, #B74444 0%, #FEBBBB 21.88%, #BF4A4A 42.19%, #FCB3B3 60.94%, #C04B4B 79.17%, #FBD4D4 100%)`,
}"
>
{{ name }}
</div>
</div>
<div
style="
width: 60%;
border-radius: 40px;
box-shadow: 0 0 2.558px 0 rgba(0, 0, 0, 0.6) inset;
padding: 1px 2px;
display: flex;
justify-content: center;
align-items: center;
"
:style="{
marginTop: ranking == '1' ? `10%` : ranking == '2' ? `8%` : `9%`,
border:
ranking == '1'
? `0.64px solid #B77C44`
: ranking == '2'
? `0.64px solid #449EB7`
: `0.64px solid #B74444`,
background:
ranking == '1'
? `linear-gradient(270deg, #000 0%, #232323 50%, #000 100%)`
: ranking == '2'
? `linear-gradient(270deg, #252625 0%, #464545 47.45%, #252625 100%)`
: `linear-gradient(270deg, #252625 0%, #464545 47.45%, #252625 100%)`,
}"
>
<img
src="/src/assets/icon/coin.png"
alt=""
style="display: block"
:style="{ width: isTopOne ? '20%' : '15%' }"
/>
<div
style="
font-weight: 700;
background-clip: text;
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
"
class="showText"
:class="isTopOne ? 'top1Text' : 'text'"
:style="{
backgroundImage:
ranking == '1'
? `radial-gradient(141.42% 141.42% at 0% 0%, #B77C44 0%, #FEE5BB 21.88%, #BF854A 42.19%, #FCDFB3 60.94%, #C0864B 79.17%, #FBE8D4 100%)`
: ranking == '2'
? `radial-gradient(141.42% 141.42% at 0% 0%, #449EB7 0%, #BBF5FE 21.88%, #4A9EBF 42.19%, #B3E6FC 60.94%, #4BA3C0 79.17%, #D4E9FB 100%)`
: `radial-gradient(141.42% 141.42% at 0% 0%, #B74444 0%, #FEBBBB 21.88%, #BF4A4A 42.19%, #FCB3B3 60.94%, #C04B4B 79.17%, #FBD4D4 100%)`,
}"
>
{{ 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.7em;
}
.text {
font-size: 0.5em;
}
@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,671 +0,0 @@
<!-- src/views/Activities/heroesDay/index.vue -->
<template>
<div class="fullPage">
<div class="bg">
<!-- 状态栏占位区域仅在APP中显示 -->
<div v-if="isInAppEnvironment" style="height: 30px"></div>
<!-- 按钮 -->
<div style="margin-top: 80vw; display: flex; justify-content: flex-end; align-items: center">
<!-- 帮助按钮 -->
<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; gap: 4px; margin-top: 1vw">
<div style="width: 15%">
<itemCenter :imgUrl="images.timeBg">
<div class="timeText" style="margin-bottom: 10%">{{ Days }}D</div>
</itemCenter>
</div>
<div class="timeText timeGap" style="width: 6px"></div>
<div style="width: 15%">
<itemCenter :imgUrl="images.timeBg">
<div class="timeText" style="margin-bottom: 10%">{{ Hours }}</div>
</itemCenter>
</div>
<div class="timeText timeGap">:</div>
<div style="width: 15%">
<itemCenter :imgUrl="images.timeBg">
<div class="timeText" style="margin-bottom: 10%">{{ Minutes }}</div>
</itemCenter>
</div>
<div class="timeText timeGap">:</div>
<div style="width: 15%">
<itemCenter :imgUrl="images.timeBg">
<div class="timeText" style="margin-bottom: 10%">{{ Second }}</div>
</itemCenter>
</div>
</div>
<!-- 每周礼物 -->
<div style="display: flex; justify-content: center; margin-top: 10px">
<div style="width: 100%; position: relative">
<img :src="images.giftsBg" alt="" style="width: 100%; display: block" />
<div
style="
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
display: flex;
justify-content: center;
align-items: center;
"
>
<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"
>
<div style="position: relative">
<img style="display: block" :src="images.giftItemBg" alt="" width="100%" />
<div
style="
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: flex;
justify-content: center;
align-items: center;
"
>
<img
:src="gift.giftPhoto"
alt=""
width="70%"
style="display: block; object-fit: cover"
/>
</div>
</div>
<div style="display: flex; justify-content: center; align-items: center; gap: 5px">
<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>
</div>
</div>
</div>
<!-- 切换按钮 -->
<div style="display: flex; justify-content: space-around">
<img
:src="rankingShow ? images.rankingBtActive : images.rankingBt"
alt=""
style="display: block; width: 40%"
@click="rankingShow = true"
/>
<img
:src="!rankingShow ? images.rewardBtActive : images.rewardsBt"
alt=""
style="display: block; width: 40%"
@click="rankingShow = false"
/>
</div>
<!-- 展示内容 -->
<div>
<!-- Ranking -->
<div v-show="rankingShow" style="position: relative; width: 100%">
<div
style="
position: absolute;
inset: 10vw 6% 6vw;
background: radial-gradient(50% 50% at 50% 50%, #fbefd6 0%, #dda03a 100%);
z-index: 1;
"
></div>
<div style="position: relative; z-index: 1">
<!-- 前三名 -->
<div style="position: relative">
<!-- 头像框 -->
<img :src="images.RankingMain" alt="" width="100%" style="display: block" />
<!-- 用户信息 -->
<div style="position: absolute; inset: 0; padding: 25% 7% 2%">
<div style="margin-top: 3%">
<!-- 第一 -->
<div style="display: flex; justify-content: center">
<TopUser
:BorderImgUrl="images.topOne"
:avatarUrl="RankingHasTop3[0].avatar"
:name="RankingHasTop3[0].nickname"
:distributionValue="RankingHasTop3[0].quantity"
style="width: 43%"
@click="viewUserInfo(RankingHasTop3[0].userId)"
/>
</div>
<!-- 第二三 -->
<div style="display: flex; justify-content: space-between; margin-top: -20%">
<TopUser
:isTopOne="false"
ranking="2"
:BorderImgUrl="images.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="images.topThree"
:avatarUrl="RankingHasTop3[2].avatar"
:name="RankingHasTop3[2].nickname"
:distributionValue="RankingHasTop3[2].quantity"
style="width: 30%"
@click="viewUserInfo(RankingHasTop3[2].userId)"
/>
</div>
</div>
</div>
</div>
<!-- 第四名开始 -->
<div v-if="showRanking.length > 0" style="margin-bottom: 6vw">
<div
v-for="listItem in showRanking"
style="position: relative"
@click="viewUserInfo(listItem.userId)"
>
<img :src="images.RankingItem" alt="" width="100%" style="display: block" />
<div
style="
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: flex;
align-items: center;
padding: 0 10%;
"
>
<div style="width: 70%; display: flex; align-items: center">
<div style="color: #edb247; font-weight: 700; width: 10%" class="UserNickname">
{{ listItem?.rank }}
</div>
<img
:src="listItem?.avatar || ''"
alt=""
style="
display: block;
width: 20%;
margin: 0 2%;
aspect-ratio: 1/1;
border-radius: 50%;
object-fit: cover;
"
@error="defaultAvatarUrl"
/>
<div
style="
width: calc(100% - 10% - 24% - 16px);
display: flex;
flex-direction: column;
"
>
<div
style="
color: #fff;
font-weight: 860;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
width: 100%;
"
class="UserNickname"
>
{{ listItem?.nickname }}
</div>
<div style="color: #fff; font-weight: 590" class="UserNickname">
ID:{{ listItem?.account }}
</div>
</div>
</div>
<div style="display: flex; width: 30%; display: flex; align-items: center">
<img
src="/src/assets/icon/coin.png"
alt=""
style="display: block; width: 30%"
/>
<div style="color: #edb247; font-weight: 700" class="UserNickname">
{{ listItem?.quantity }}
</div>
</div>
</div>
</div>
</div>
<!-- 底框 -->
<img
:src="images.RankingBottomBorder"
alt=""
width="100%"
style="display: block; margin-top: -35vw; 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"
>
<div style="position: relative">
<img
:src="topImg[Number(rewardsTop.rankRange) - 1]"
alt=""
style="display: block; width: 100%"
/>
<div
style="
position: absolute;
inset: 0;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
padding: 30vw 8vw 15vw;
"
>
<div
v-for="(reward, rewardIndex) in rewardsTop.rewards"
:key="rewardIndex"
style="width: 100%"
>
<div style="position: relative">
<img :src="images.giftItemBg" style="display: block" alt="" width="100%" />
<div
style="
position: absolute;
inset: 0;
display: flex;
justify-content: center;
align-items: center;
"
>
<img
:src="reward.cover || ''"
alt=""
width="70%"
style="display: block; aspect-ratio: 1/1"
@error="(e) => handleImageError(e, reward.type)"
/>
</div>
</div>
<div style="color: rgba(255, 255, 255, 1); font-weight: 590; text-align: center">
{{ showDetail(reward.type, reward) }}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 我的排名 -->
<div
style="
position: sticky;
bottom: 0;
left: 0;
width: 100vw;
background: linear-gradient(90deg, #96683b 0%, #7f5539 100%);
display: flex;
justify-content: center;
margin-top: 10px;
z-index: 999;
"
>
<img :src="images.myRankingBg" alt="" style="width: calc(100% - 1px); display: block" />
<div
style="
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
display: flex;
align-items: center;
justify-content: center;
padding: 2% 5% 0;
"
>
<div
style="width: 70%; display: flex; justify-content: space-around; align-items: center"
>
<!-- 排名 -->
<div style="color: #edb247; font-weight: 700">{{ myRanking.rank || 999 }}</div>
<!-- 头像 -->
<img
:src="myRanking.avatar || ''"
alt=""
style="
display: block;
width: 25%;
aspect-ratio: 1/1;
border-radius: 50%;
object-fit: cover;
margin: 0 12px;
"
@error="defaultAvatarUrl"
/>
<!-- 名称 -->
<div style="display: flex; flex-direction: column; width: calc(100% - 24px - 25%)">
<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: 30%; display: flex; justify-content: center; align-items: center">
<img
src="/src/assets/icon/coin.png"
alt=""
style="display: block; width: 20%; height: 20%"
/>
<div style="color: #edb247; font-weight: 700">
{{ myRanking.quantity || 0 }}
</div>
</div>
</div>
</div>
<!-- 弹窗遮罩层 -->
<maskLayer :maskLayerShow="maskLayerShow" @click="maskLayerShow = false">
<!-- help弹窗 -->
<div style="margin: 20% 0" @click.stop>
<img :src="images.helpInfo" alt="" style="display: block; width: 100%" />
</div>
</maskLayer>
</div>
</div>
</template>
<script setup>
import { isInApp, viewUserInfo } from '@/utils/appBridge.js'
import { computed, onMounted, onUnmounted, ref } from 'vue'
import itemCenter from '@/components/itemCenter.vue'
import TopUser from './components/topUser.vue'
import maskLayer from '@/components/MaskLayer.vue'
import { getThisWeekRewardsAndGifts, getRankingListAndMyRanking } from '@/api/activity.js'
import { connectToApp } from '@/utils/appConnector.js'
// vite
const imageModules = import.meta.glob(
'@/assets/images/Activities/Palestinian/IndependenceDay/*.{png,jpg,svg}',
{
eager: true,
}
)
//
const images = Object.fromEntries(
Object.entries(imageModules).map(([path, module]) => {
const fileName = path.split('/').pop().split('.')[0]
return [fileName, module.default]
})
)
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([images.top1RewardBg, images.top2RewardBg, images.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)
})
//
const handleImageError = (e, type) => {
console.log('图片资源出错')
e.target.onerror = null //
if ((type = 'GOLD')) {
e.target.src = new URL('/src/assets/icon/coin.png', import.meta.url).href
}
}
//
const defaultAvatarUrl = (e) => {
console.log('头像资源出错')
e.target.onerror = null //
e.target.src = new URL('/src/assets/icon/defaultAvatar.png', import.meta.url).href
}
// 2025112210
const getTargetTime = () => {
const targetDate = new Date(2025, 10, 22, 10, 0, 0) // 01011
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 () => {
const resMyWeekStarRanking = await getRankingListAndMyRanking(3)
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('1989220558472130561')
if (resRewardsAndGifts.status && resRewardsAndGifts.body) {
gifts.value = resRewardsAndGifts.body.gifts
rewardsList.value = resRewardsAndGifts.body.butOneRewards
}
}
//
const initData = () => {
getListAndMy() //
getRewardsAndGifts() //
}
// 使APP
const connectToAppHandler = async () => {
await connectToApp(() => {
//
initData() //
})
}
//
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 {
background: linear-gradient(90deg, #96683b 0%, #7f5539 100%);
position: relative;
}
.bg {
width: 100vw;
min-height: 100vh;
background-image: url(../../../../assets/images/Activities/Palestinian/IndependenceDay/bg.png);
background-size: 100% auto;
background-repeat: no-repeat;
}
.timeText {
color: #fff;
font-weight: 860;
}
.timeGap {
display: flex;
justify-content: center;
align-items: center;
margin-bottom: 2%;
}
.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>