test(图片缓存功能): 针对静态图片缓存进行测试

This commit is contained in:
hzj 2025-11-18 15:31:12 +08:00
parent d9cf63af3d
commit 16559b0019
3 changed files with 16 additions and 2 deletions

View File

@ -1,7 +1,7 @@
<template> <template>
<div style="position: relative; width: 100%"> <div style="position: relative; width: 100%">
<!-- 背景图 --> <!-- 背景图 -->
<img :src="imgUrl" alt="" width="100%" style="display: block" /> <img v-smart-img :src="imgUrl" alt="" width="100%" style="display: block" />
<!-- 内容 --> <!-- 内容 -->
<div <div
style=" style="

View File

@ -2,6 +2,7 @@
<div style="width: 100%"> <div style="width: 100%">
<div style="position: relative"> <div style="position: relative">
<img <img
v-smart-img
:src="BorderImgUrl" :src="BorderImgUrl"
alt="" alt=""
width="100%" width="100%"
@ -23,6 +24,7 @@
> >
<div :style="{ width: isTopOne ? '31%' : '58%' }"> <div :style="{ width: isTopOne ? '31%' : '58%' }">
<img <img
v-smart-img
:src="avatarUrl || ''" :src="avatarUrl || ''"
alt="" alt=""
width="100%" width="100%"
@ -81,6 +83,7 @@
}" }"
> >
<img <img
v-smart-img
src="/src/assets/icon/coin.png" src="/src/assets/icon/coin.png"
alt="" alt=""
style="display: block" style="display: block"

View File

@ -12,6 +12,7 @@
<div style="margin-top: 80vw; display: flex; justify-content: flex-end; align-items: center"> <div style="margin-top: 80vw; display: flex; justify-content: flex-end; align-items: center">
<!-- 帮助按钮 --> <!-- 帮助按钮 -->
<img <img
v-smart-img
:src="images.help" :src="images.help"
alt="" alt=""
style="display: block; position: relative; width: 10%; margin-right: 8px" style="display: block; position: relative; width: 10%; margin-right: 8px"
@ -57,6 +58,7 @@
> >
<itemCenter :imgUrl="images.giftItemBg" <itemCenter :imgUrl="images.giftItemBg"
><img ><img
v-smart-img
:src="gift.giftPhoto" :src="gift.giftPhoto"
alt="" alt=""
width="70%" width="70%"
@ -64,6 +66,7 @@
/></itemCenter> /></itemCenter>
<div style="display: flex; justify-content: center; align-items: center; gap: 5px"> <div style="display: flex; justify-content: center; align-items: center; gap: 5px">
<img <img
v-smart-img
src="/src/assets/icon/coin.png" src="/src/assets/icon/coin.png"
alt="" alt=""
style="display: block; width: 25%; aspect-ratio: 1/1" style="display: block; width: 25%; aspect-ratio: 1/1"
@ -80,12 +83,14 @@
<!-- 切换按钮 --> <!-- 切换按钮 -->
<div style="display: flex; justify-content: space-around"> <div style="display: flex; justify-content: space-around">
<img <img
v-smart-img
:src="rankingShow ? images.rankingBtActive : images.rankingBt" :src="rankingShow ? images.rankingBtActive : images.rankingBt"
alt="" alt=""
style="display: block; width: 40%" style="display: block; width: 40%"
@click="rankingShow = true" @click="rankingShow = true"
/> />
<img <img
v-smart-img
:src="!rankingShow ? images.rewardBtActive : images.rewardsBt" :src="!rankingShow ? images.rewardBtActive : images.rewardsBt"
alt="" alt=""
style="display: block; width: 40%" style="display: block; width: 40%"
@ -160,6 +165,7 @@
{{ listItem?.rank }} {{ listItem?.rank }}
</div> </div>
<img <img
v-smart-img
:src="listItem?.avatar || ''" :src="listItem?.avatar || ''"
alt="" alt=""
style=" style="
@ -202,6 +208,7 @@
<div style="flex: 1; min-width: 0; display: flex; align-items: center"> <div style="flex: 1; min-width: 0; display: flex; align-items: center">
<img <img
v-smart-img
src="/src/assets/icon/coin.png" src="/src/assets/icon/coin.png"
alt="" alt=""
style="display: block; width: 30%; aspect-ratio: 1/1; object-fit: cover" style="display: block; width: 30%; aspect-ratio: 1/1; object-fit: cover"
@ -215,6 +222,7 @@
<!-- 底框 --> <!-- 底框 -->
<img <img
v-smart-img
:src="images.RankingBottomBorder" :src="images.RankingBottomBorder"
alt="" alt=""
width="100%" width="100%"
@ -244,6 +252,7 @@
> >
<itemCenter :imgUrl="images.giftItemBg"> <itemCenter :imgUrl="images.giftItemBg">
<img <img
v-smart-img
:src="reward.cover || ''" :src="reward.cover || ''"
alt="" alt=""
width="70%" width="70%"
@ -293,6 +302,7 @@
</div> </div>
<!-- 头像 --> <!-- 头像 -->
<img <img
v-smart-img
:src="myRanking.avatar || ''" :src="myRanking.avatar || ''"
alt="" alt=""
style=" style="
@ -335,6 +345,7 @@
style="flex: 1; min-width: 0; display: flex; justify-content: center; align-items: center" style="flex: 1; min-width: 0; display: flex; justify-content: center; align-items: center"
> >
<img <img
v-smart-img
src="/src/assets/icon/coin.png" src="/src/assets/icon/coin.png"
alt="" alt=""
style="display: block; width: 30%; aspect-ratio: 1/1; object-fit: cover" style="display: block; width: 30%; aspect-ratio: 1/1; object-fit: cover"
@ -349,7 +360,7 @@
<maskLayer :maskLayerShow="maskLayerShow" @click="maskLayerShow = false"> <maskLayer :maskLayerShow="maskLayerShow" @click="maskLayerShow = false">
<!-- help弹窗 --> <!-- help弹窗 -->
<div style="margin: 20% 0" @click.stop> <div style="margin: 20% 0" @click.stop>
<img :src="images.helpInfo" alt="" style="display: block; width: 100%" /> <img v-smart-img :src="images.helpInfo" alt="" style="display: block; width: 100%" />
</div> </div>
</maskLayer> </maskLayer>
</div> </div>