From c76d779f4e9aa206ca72c16a016999ecc696be3c Mon Sep 17 00:00:00 2001 From: zerosaturation Date: Thu, 21 May 2026 14:16:10 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E9=80=89=E6=8B=A9=E4=BD=9C=E5=93=81?= =?UTF-8?q?=E7=9A=84=E7=AD=89=E7=BA=A7=E5=9B=BE=E6=A0=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/pages/components/AssetSelector.vue | 48 +++++++++------------ 1 file changed, 21 insertions(+), 27 deletions(-) diff --git a/frontend/pages/components/AssetSelector.vue b/frontend/pages/components/AssetSelector.vue index 14772bd..3375c28 100644 --- a/frontend/pages/components/AssetSelector.vue +++ b/frontend/pages/components/AssetSelector.vue @@ -51,7 +51,7 @@ :src="getGradeBackground(gradeItem.grade)" mode="aspectFill" > - {{ formatGrade(gradeItem.grade) }} + @@ -202,20 +202,22 @@ const currentItems = computed(() => { }); // grade 中文转换 -const gradeMap = { 1: '一', 2: '二', 3: '三', 4: '四', 5: '五' }; -const formatGrade = (grade) => `V${grade}`; +// const gradeMap = { 1: '一', 2: '二', 3: '三', 4: '四', 5: '五' }; +// const formatGrade = (grade) => `V${grade}`; // 获取等级背景图 -const getGradeBackground = (grade) => { - if (grade <= 2) { - return '/static/starbookcontent/V1dengji.png'; - } else if (grade <= 4) { - return '/static/starbookcontent/V2dengji.png'; - } else { - return '/static/starbookcontent/V3dengji.png'; - } +const gradeMap = { + 1: '/static/starbookcontent/grade/Ndengji.png', + 2: '/static/starbookcontent/grade/Rdengji.png', + 3: '/static/starbookcontent/grade/SRdengji.png', + 4: '/static/starbookcontent/grade/SSRdengji.png', + 5: '/static/starbookcontent/grade/URengji.png', }; +function getGradeBackground(grade) { + return gradeMap[grade] || gradeMap[1]; +} + // 切换类型 const switchType = (type) => { currentType.value = type; @@ -485,30 +487,20 @@ const handleTouchEnd = (e) => { } .grade-section { - background: #f0839960; border-radius: 16rpx; - padding: 20rpx; - margin-bottom: 20rpx; + padding:0 20rpx; } .grade-header { position: relative; - margin-bottom: 16rpx; - padding: 16rpx 24rpx; - display: inline-flex; - align-items: center; - justify-content: center; - width: 160rpx; - height: 32rpx; + /* width: 160rpx; */ + height: 80rpx; + } .grade-header-bg { - position: absolute; - top: 0; - left: 0; - width: 160rpx; - height: 64rpx; - z-index: 0; + width: 80rpx; + height: 80rpx; } .grade-title { @@ -523,6 +515,8 @@ const handleTouchEnd = (e) => { width: 100%; height: 288rpx; white-space: nowrap; + background: #f0839960; + padding: 0.5rem; } .asset-row::-webkit-scrollbar {