feat(幸运美金页): 修复文件和图片的导入问题

This commit is contained in:
hzj 2026-04-09 20:14:25 +08:00
parent 9fe4400fcd
commit 42ab7316b3
3 changed files with 28 additions and 16 deletions

View File

@ -62,7 +62,7 @@
<script setup> <script setup>
import { ref, computed, onMounted, onUnmounted, watch } from 'vue' import { ref, computed, onMounted, onUnmounted, watch } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import { handleAvatarImageError } from '@/utils/imageHandler.js' import { handleAvatarImageError, handleRewardImageError } from '@/utils/image/imageHandler.js'
const { locale, t } = useI18n() const { locale, t } = useI18n()

View File

@ -89,7 +89,7 @@
</template> </template>
<script setup> <script setup>
import { handleAvatarImageError } from '@/utils/imageHandler.js' import { handleAvatarImageError, handleRewardImageError } from '@/utils/image/imageHandler.js'
import { computed } from 'vue' import { computed } from 'vue'
const props = defineProps({ const props = defineProps({

View File

@ -19,7 +19,7 @@
<!-- 页面内容 --> <!-- 页面内容 -->
<div class="content-layer" style="position: relative; z-index: 2"> <div class="content-layer" style="position: relative; z-index: 2">
<!-- 头部动画 --> <!-- 头部动画 -->
<img v-smart-img :src="webpUrl('pageTop')" alt="" width="100%" style="display: block" /> <!-- <img v-smart-img :src="webpUrl('pageTop')" alt="" width="100%" style="display: block" /> -->
<!-- 倒计时和帮助按钮 --> <!-- 倒计时和帮助按钮 -->
<div class="timeAndHelp"> <div class="timeAndHelp">
@ -989,7 +989,7 @@
<!-- 帮助按钮 --> <!-- 帮助按钮 -->
<img <img
v-smart-img v-smart-img
src="/src/assets/icon/helpWhite.png" src="/src/assets/icon/Azizi/helpWhite.png"
alt="" alt=""
class="ruleBt" class="ruleBt"
@click="openPopup('help')" @click="openPopup('help')"
@ -1076,7 +1076,7 @@
<img <img
v-smart-img v-smart-img
class="flipImg" class="flipImg"
src="/src/assets/icon/arrowWhite.png" src="/src/assets/icon/Azizi/arrowWhite.png"
alt="" alt=""
style="width: 1em; display: block; transition: all 0.2s ease" style="width: 1em; display: block; transition: all 0.2s ease"
:class="{ rotated: transferShow }" :class="{ rotated: transferShow }"
@ -1230,7 +1230,12 @@
@click="selectCoin(coin)" @click="selectCoin(coin)"
:class="['coin-item', { selected: selectedCoin?.id === coin.id }]" :class="['coin-item', { selected: selectedCoin?.id === coin.id }]"
> >
<img v-smart-img src="/src/assets/icon/dollar.png" alt="" style="width: 40%" /> <img
v-smart-img
src="/src/assets/icon/Azizi/dollar.png"
alt=""
style="width: 40%"
/>
<div style="font-weight: 500; color: #fff">${{ coin.price }}</div> <div style="font-weight: 500; color: #fff">${{ coin.price }}</div>
</div> </div>
</div> </div>
@ -1280,7 +1285,7 @@
<img <img
v-smart-img v-smart-img
class="flipImg" class="flipImg"
src="/src/assets/icon/arrowWhite.png" src="/src/assets/icon/Azizi/arrowWhite.png"
alt="" alt=""
style="width: 1em; display: block; transition: all 0.2s ease" style="width: 1em; display: block; transition: all 0.2s ease"
:class="{ rotated: exchangeShow }" :class="{ rotated: exchangeShow }"
@ -1306,7 +1311,12 @@
@click="selectCoin(coin)" @click="selectCoin(coin)"
:class="['coin-item', { selected: selectedCoin?.id == coin.id }]" :class="['coin-item', { selected: selectedCoin?.id == coin.id }]"
> >
<img v-smart-img src="/src/assets/icon/coin.png" alt="" style="width: 40%" /> <img
v-smart-img
src="/src/assets/icon/Azizi/coin.png"
alt=""
style="width: 40%"
/>
<div style="font-size: 0.7em">{{ coin.amount }} coins x1</div> <div style="font-size: 0.7em">{{ coin.amount }} coins x1</div>
<div style="font-weight: 500; color: #fff">${{ coin.price }}</div> <div style="font-weight: 500; color: #fff">${{ coin.price }}</div>
</div> </div>
@ -1359,7 +1369,7 @@
<img <img
v-smart-img v-smart-img
class="flipImg" class="flipImg"
src="/src/assets/icon/arrowWhite.png" src="/src/assets/icon/Azizi/arrowWhite.png"
alt="" alt=""
style="width: 1em; display: block" style="width: 1em; display: block"
/> />
@ -1647,8 +1657,8 @@ import { setUserInfo } from '@/utils/userStore.js'
import { formatUTCCustom } from '@/utils/utcFormat.js' import { formatUTCCustom } from '@/utils/utcFormat.js'
import { showError, showSuccess } from '@/utils/toast.js' import { showError, showSuccess } from '@/utils/toast.js'
import { getSelectedPayee, clearSelectedPayee } from '@/utils/payeeStore.js' import { getSelectedPayee, clearSelectedPayee } from '@/utils/payeeStore.js'
import { handleAvatarImageError, handleRewardImageError } from '@/utils/imageHandler.js' import { handleAvatarImageError, handleRewardImageError } from '@/utils/image/imageHandler.js'
import { preloadImages } from '@/utils/imagePreloader.js' import { preloadImages } from '@/utils/image/imagePreloader.js'
import { useThrottle } from '@/utils/useDebounce' import { useThrottle } from '@/utils/useDebounce'
import { getMemberProfile, getUserIdentity } from '@/api/wallet' import { getMemberProfile, getUserIdentity } from '@/api/wallet'
@ -1693,8 +1703,8 @@ const currentLangType = computed(() => {
const isLoading = ref(true) // const isLoading = ref(true) //
// OSSURL // OSSURL
const imageUrl = (filename) => getPngUrl('Activities/newYear/', filename) const imageUrl = (filename) => getPngUrl('Activities/LuckyDollars/Season4/', filename)
const webpUrl = (filename) => getWebpUrl('Activities/newYear/', filename) const webpUrl = (filename) => getWebpUrl('Activities/LuckyDollars/Season4/', filename)
// //
const getImgName = (filename) => { const getImgName = (filename) => {
@ -2605,7 +2615,7 @@ const initData = async () => {
// //
const preloadCriticalImages = async () => { const preloadCriticalImages = async () => {
const criticalImages = [ const criticalImages = [
webpUrl('pageTop'), // webpUrl('pageTop'),
imageUrl('bg0'), imageUrl('bg0'),
imageUrl('bg1'), imageUrl('bg1'),
imageUrl('bg2'), imageUrl('bg2'),
@ -2617,6 +2627,8 @@ const preloadCriticalImages = async () => {
imageUrl('rechargehidden'), imageUrl('rechargehidden'),
imageUrl('rechargeShow'), imageUrl('rechargeShow'),
imageUrl('rewardBg'), imageUrl('rewardBg'),
imageUrl('rewardBack'),
imageUrl('rewardNext'),
imageUrl(getImgName('rewardReceive')), imageUrl(getImgName('rewardReceive')),
imageUrl(getImgName('rewardReceived')), imageUrl(getImgName('rewardReceived')),
imageUrl(getImgName('rewardReceiveNot')), imageUrl(getImgName('rewardReceiveNot')),
@ -2659,7 +2671,7 @@ const preloadOtherImages = async () => {
imageUrl(getImgName('lotteryBtActive')), imageUrl(getImgName('lotteryBtActive')),
imageUrl('myRankingBg'), imageUrl('myRankingBg'),
imageUrl('RankingItem'), imageUrl('RankingItem'),
imageUrl('rulesBt'), imageUrl(getImgName('rulesBt')),
imageUrl(getImgName('ruleInfo')), imageUrl(getImgName('ruleInfo')),
imageUrl('taskBtGo'), imageUrl('taskBtGo'),
imageUrl('taskBtReceive'), imageUrl('taskBtReceive'),
@ -2924,7 +2936,7 @@ onUnmounted(() => {
} }
.timeAndHelp { .timeAndHelp {
margin-top: -12vw; margin-top: 90vw;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;