perf(assets): Player/Admin 静态图改用 WebP,vs 保留 PNG

Player 端 banner/bg/card/h5bg 等改为 webp 并移除旧 png;Admin 登录背景改 webp;vs 对阵图仍用 png。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-12 11:16:51 +08:00
parent 312c3c5816
commit bc5b8e0950
28 changed files with 19 additions and 14 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 622 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 82 KiB

View File

@@ -7,7 +7,7 @@ import { useAuthStore, type StaffUser } from '../stores/auth';
import RobotVerify from '../components/RobotVerify.vue'; import RobotVerify from '../components/RobotVerify.vue';
import AdminLocaleSwitcher from '../components/AdminLocaleSwitcher.vue'; import AdminLocaleSwitcher from '../components/AdminLocaleSwitcher.vue';
import { useAdminLocale } from '../composables/useAdminLocale'; import { useAdminLocale } from '../composables/useAdminLocale';
import bgImage from '../assets/images/bg.png'; import bgImage from '../assets/images/bg.webp';
const router = useRouter(); const router = useRouter();
const route = useRoute(); const route = useRoute();

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 309 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 913 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 771 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -4,7 +4,7 @@ import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
const { t } = useI18n(); const { t } = useI18n();
import defaultBannerImg from '../assets/images/banner.png'; import defaultBannerImg from '../assets/images/banner.webp';
export interface BannerItem { export interface BannerItem {
id?: string; id?: string;

View File

@@ -1,8 +1,8 @@
<script setup lang="ts"> <script setup lang="ts">
import { computed } from 'vue'; import { computed } from 'vue';
import MatchBetCard from './MatchBetCard.vue'; import MatchBetCard from './MatchBetCard.vue';
import saishiImg from '../assets/images/saishi.png'; import saishiImg from '../assets/images/saishi.webp';
import cardBg from '../assets/images/card-bg.png'; import cardBg from '../assets/images/card-bg.webp';
const matchCardBg = `url(${cardBg})`; const matchCardBg = `url(${cardBg})`;

View File

@@ -2,8 +2,8 @@
import { computed } from 'vue'; import { computed } from 'vue';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import OutrightOptionCard from './OutrightOptionCard.vue'; import OutrightOptionCard from './OutrightOptionCard.vue';
import saishiImg from '../../assets/images/saishi.png'; import saishiImg from '../../assets/images/saishi.webp';
import cardBg from '../../assets/images/card-bg.png'; import cardBg from '../../assets/images/card-bg.webp';
const matchCardBg = `url(${cardBg})`; const matchCardBg = `url(${cardBg})`;

View File

@@ -9,7 +9,7 @@ import { PARLAY_MARKET_TYPES, PARLAY_SELECTION_KEYS, PARLAY_MARKET_GROUPS } from
import BetGuideHelp from '../BetGuideHelp.vue'; import BetGuideHelp from '../BetGuideHelp.vue';
import GoldSpinner from '../GoldSpinner.vue'; import GoldSpinner from '../GoldSpinner.vue';
import TeamEmblem from '../TeamEmblem.vue'; import TeamEmblem from '../TeamEmblem.vue';
import cardBg from '../../assets/images/card-bg.png'; import cardBg from '../../assets/images/card-bg.webp';
import { matchPhaseLabel, type MatchPhase } from '../../utils/matchPhase'; import { matchPhaseLabel, type MatchPhase } from '../../utils/matchPhase';
const matchCardBg = `url(${cardBg})`; const matchCardBg = `url(${cardBg})`;

View File

@@ -1,7 +1,7 @@
import type { BannerItem } from '../components/BannerCarousel.vue'; import type { BannerItem } from '../components/BannerCarousel.vue';
/** 默认轮播首图apps/player/src/assets/images/banner.png */ /** 默认轮播首图apps/player/src/assets/images/banner.webp */
import defaultBannerImg from '../assets/images/banner.png'; import defaultBannerImg from '../assets/images/banner.webp';
const FALLBACK_BANNER_URL = '/uploads/banners/welcome.svg'; const FALLBACK_BANNER_URL = '/uploads/banners/welcome.svg';

View File

@@ -197,7 +197,7 @@ body {
background-image: background-image:
radial-gradient(ellipse 120% 60% at 50% -10%, rgba(212, 175, 55, 0.14), transparent 55%), radial-gradient(ellipse 120% 60% at 50% -10%, rgba(212, 175, 55, 0.14), transparent 55%),
linear-gradient(rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.88)), linear-gradient(rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.88)),
url('./assets/images/bg.png'); url('./assets/images/bg.webp');
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center center; background-position: center center;
background-size: cover; background-size: cover;

View File

@@ -3,7 +3,7 @@ import { useRouter } from 'vue-router';
import { useI18n } from 'vue-i18n'; import { useI18n } from 'vue-i18n';
import emptyMatchesImg from '../assets/images/empty-matches.svg'; import emptyMatchesImg from '../assets/images/empty-matches.svg';
import vsImg from '../assets/images/vs.png'; import vsImg from '../assets/images/vs.png';
import cardBg from '../assets/images/card-bg.png'; import cardBg from '../assets/images/card-bg.webp';
import BannerCarousel from '../components/BannerCarousel.vue'; import BannerCarousel from '../components/BannerCarousel.vue';
import { usePlayerHome } from '../composables/usePlayerHome'; import { usePlayerHome } from '../composables/usePlayerHome';
import TeamEmblem from '../components/TeamEmblem.vue'; import TeamEmblem from '../components/TeamEmblem.vue';

View File

@@ -8,7 +8,7 @@ import { useAppLocale } from '../composables/useAppLocale';
import LocaleSwitcher from '../components/LocaleSwitcher.vue'; import LocaleSwitcher from '../components/LocaleSwitcher.vue';
import PhoneCountrySelect from '../components/PhoneCountrySelect.vue'; import PhoneCountrySelect from '../components/PhoneCountrySelect.vue';
import RobotVerify from '../components/RobotVerify.vue'; import RobotVerify from '../components/RobotVerify.vue';
import loginBg from '../assets/images/h5bg.png'; import loginBg from '../assets/images/h5bg.webp';
type LoginMode = 'account' | 'phone'; type LoginMode = 'account' | 'phone';

View File

@@ -9,7 +9,7 @@ import { useAuthStore } from '../stores/auth';
import { useAppLocale } from '../composables/useAppLocale'; import { useAppLocale } from '../composables/useAppLocale';
import GoldSpinner from '../components/GoldSpinner.vue'; import GoldSpinner from '../components/GoldSpinner.vue';
import { usePullToRefresh } from '../composables/usePullToRefresh'; import { usePullToRefresh } from '../composables/usePullToRefresh';
import walletBg from '../assets/images/wallet-bg.png'; import walletBg from '../assets/images/wallet-bg.webp';
const { t, locale } = useI18n(); const { t, locale } = useI18n();
const router = useRouter(); const router = useRouter();

View File

@@ -8,7 +8,7 @@ import { useAppLocale } from '../composables/useAppLocale';
import { useSmsCode } from '../composables/useSmsCode'; import { useSmsCode } from '../composables/useSmsCode';
import LocaleSwitcher from '../components/LocaleSwitcher.vue'; import LocaleSwitcher from '../components/LocaleSwitcher.vue';
import PhoneCountrySelect from '../components/PhoneCountrySelect.vue'; import PhoneCountrySelect from '../components/PhoneCountrySelect.vue';
import loginBg from '../assets/images/h5bg.png'; import loginBg from '../assets/images/h5bg.webp';
const { t, locale } = useI18n(); const { t, locale } = useI18n();
const { initFromUser } = useAppLocale(); const { initFromUser } = useAppLocale();

View File

@@ -21,3 +21,8 @@ declare module '*.png' {
const src: string; const src: string;
export default src; export default src;
} }
declare module '*.webp' {
const src: string;
export default src;
}