From 1138e1f0def494d0a6778245326adf08efee5f22 Mon Sep 17 00:00:00 2001 From: zzc <1761997216@qq.com> Date: Sat, 23 May 2026 23:59:54 +0800 Subject: [PATCH] fix: rating --- pages/rating/detail.vue | 547 +++++++++++++++------------------------- 1 file changed, 199 insertions(+), 348 deletions(-) diff --git a/pages/rating/detail.vue b/pages/rating/detail.vue index ba752dc..532810a 100644 --- a/pages/rating/detail.vue +++ b/pages/rating/detail.vue @@ -14,59 +14,36 @@ - - - - - - - - #千古一帝 - #文治武功 - #历史 - - {{ detailData.name }} - - 🏆 No.1 - 热度 98.2w - 23万人参与 - - - + - - - - - {{ detailData.score }} - - 📈 - 本周上涨 1 名 + + + + + + + {{ detailData.name }} + {{ detailData.score }} - - - - - 封神率 - 78% + + 🥇 No.1 + 🔥 98.2w 热度 - - 争议度 - 21% - - - - - 👑 千古一帝 - ⚔️ 战力爆炸 - 📚 文治巅峰 - 🔥 影响力拉满 - - - 你的态度 + + + + + AI观察员 + + {{ detailData.aiSummary }} + + + + + 你的态度 - {{ action.emoji }} + + {{ action.emoji }} + {{ action.label }} - + - - - - - AI观察员 - - {{ detailData.aiSummary }} - - - + - 大家都在 PK + 大家都在 PK 去对比 @@ -122,7 +92,7 @@ - + 最热 @@ -223,7 +193,6 @@ const handleAction = (val) => { }; onLoad((options) => { - // 可以通过 options.itemId 获取传递过来的参数进行数据请求 console.log('Received itemId:', options.itemId); }); @@ -261,14 +230,7 @@ onReachBottom(() => { left: 0; right: 0; z-index: 100; - background-color: transparent; - transition: background-color 0.3s; -} - -/* 模拟滚动变色可以后续加,这里先用半透明黑色背景保证字看得清 */ -.nav-bar { - background-color: rgba(0, 0, 0, 0.2); - backdrop-filter: blur(10px); + background-color: #f5f6fa; } .nav-content { @@ -287,7 +249,7 @@ onReachBottom(() => { .back-icon { width: 40rpx; height: 40rpx; - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'%3E%3C/line%3E%3Cpolyline points='12 19 5 12 12 5'%3E%3C/polyline%3E%3C/svg%3E"); + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='19' y1='12' x2='5' y2='12'%3E%3C/line%3E%3Cpolyline points='12 19 5 12 12 5'%3E%3C/polyline%3E%3C/svg%3E"); background-size: cover; margin-right: 16rpx; } @@ -295,7 +257,7 @@ onReachBottom(() => { .nav-title { font-size: 34rpx; font-weight: bold; - color: #fff; + color: #111; } .nav-right { @@ -318,184 +280,110 @@ onReachBottom(() => { background-color: #eee; } -/* 顶部背景与信息 */ -.header-bg { - position: relative; - width: 100%; - height: 560rpx; +.content-wrap { + padding: 24rpx 32rpx; } -.bg-image { - width: 100%; - height: 100%; - position: absolute; - top: 0; - left: 0; -} - -.bg-mask { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0) 50%, rgba(245,246,250,1) 100%); -} - -.header-info { - position: relative; - z-index: 10; - padding: 0 32rpx; -} - -.tags-wrap { - display: flex; - gap: 16rpx; - margin-bottom: 24rpx; -} - -.tag { - background-color: rgba(255,255,255,0.3); - color: #fff; - font-size: 22rpx; - padding: 6rpx 20rpx; - border-radius: 100rpx; - backdrop-filter: blur(4px); -} - -.hero-title { - font-size: 64rpx; - font-weight: 900; - color: #fff; - display: block; - margin-bottom: 24rpx; - text-shadow: 0 4rpx 8rpx rgba(0,0,0,0.3); -} - -.hero-stats { - display: flex; - align-items: center; - gap: 24rpx; -} - -.rank-badge { - color: #ffd700; - font-weight: bold; - font-size: 26rpx; - text-shadow: 0 2rpx 4rpx rgba(0,0,0,0.5); -} - -.stat-text { - color: rgba(255,255,255,0.9); - font-size: 24rpx; - text-shadow: 0 2rpx 4rpx rgba(0,0,0,0.5); -} - -/* 内容区 */ -.content-body { - position: relative; - z-index: 20; - margin-top: -60rpx; - padding: 0 32rpx; -} - -/* 核心面板 */ -.core-panel { - background-color: #fff; - border-radius: 32rpx; - padding: 40rpx 32rpx; - margin-bottom: 32rpx; - box-shadow: 0 8rpx 32rpx rgba(0,0,0,0.04); -} - -.score-wrap { - display: flex; - flex-direction: column; - align-items: center; - margin-bottom: 32rpx; -} - -.main-score { - font-size: 88rpx; - font-weight: 900; - color: #2953ff; - font-family: 'DIN Alternate', sans-serif; - line-height: 1; - margin-bottom: 12rpx; -} - -.trend-wrap { - display: flex; - align-items: center; - color: #2953ff; - font-size: 24rpx; - font-weight: bold; -} - -.trend-icon { - margin-right: 8rpx; -} - -.rate-stats { - display: flex; - justify-content: space-between; - gap: 24rpx; - margin-bottom: 32rpx; -} - -.rate-item { - flex: 1; - background-color: #f5f7ff; - border-radius: 20rpx; - padding: 24rpx; - display: flex; - flex-direction: column; - align-items: center; -} - -.rate-item.dispute { - background-color: #f8f9fa; -} - -.rate-label { - font-size: 24rpx; - color: #666; - margin-bottom: 8rpx; -} - -.rate-value { - font-size: 40rpx; - font-weight: 800; - color: #111; -} - -.feature-tags { - display: flex; - flex-wrap: wrap; - justify-content: center; - gap: 16rpx; -} - -.f-tag { - background-color: #fff; - border: 2rpx solid #eef1ff; - padding: 10rpx 24rpx; - border-radius: 100rpx; - font-size: 24rpx; - color: #444; - font-weight: bold; - box-shadow: 0 4rpx 12rpx rgba(41,83,255,0.05); -} - -/* 你的态度面板 */ -.attitude-panel { +.card { background-color: #fff; border-radius: 32rpx; padding: 32rpx; - margin-bottom: 32rpx; + margin-bottom: 24rpx; } -.panel-title { +/* 英雄卡片 */ +.hero-card { + display: flex; + align-items: center; +} + +.hero-avatar { + width: 140rpx; + height: 140rpx; + border-radius: 50%; + margin-right: 32rpx; + border: 4rpx solid #fff; + box-shadow: 0 4rpx 16rpx rgba(0,0,0,0.1); +} + +.hero-info { + flex: 1; +} + +.hero-name-row { + display: flex; + align-items: baseline; + margin-bottom: 12rpx; +} + +.hero-name { + font-size: 44rpx; + font-weight: bold; + color: #111; + margin-right: 16rpx; +} + +.hero-score { + font-size: 44rpx; + font-weight: 900; + color: #2953ff; + font-family: 'DIN Alternate', sans-serif; +} + +.hero-meta { + display: flex; + align-items: center; + font-size: 24rpx; + color: #666; +} + +.meta-rank { + margin-right: 24rpx; + font-weight: bold; + color: #d9a000; +} + +.meta-heat { + color: #666; +} + +/* AI 观察员 */ +.ai-card { + background: #ffffff; + border: 2rpx solid #e0d6ff; + border-radius: 32rpx; + padding: 32rpx; + margin-bottom: 24rpx; +} + +.ai-header { + display: flex; + align-items: center; + margin-bottom: 16rpx; +} + +.ai-icon { + width: 36rpx; + height: 36rpx; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237B46F1'%3E%3Cpath d='M12 2a2 2 0 0 1 2 2c0 .74-.4 1.39-1 1.73V7h5a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h5V5.73A2 2 0 0 1 10 4a2 2 0 0 1 2-2zm-3 8a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm6 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z'/%3E%3C/svg%3E"); + background-size: cover; + margin-right: 12rpx; +} + +.ai-title { + font-size: 28rpx; + font-weight: 800; + color: #7b46f1; +} + +.ai-content { + font-size: 28rpx; + color: #333; + line-height: 1.6; +} + +/* 你的态度面板 */ +.section-title { font-size: 34rpx; font-weight: bold; color: #111; @@ -516,9 +404,12 @@ onReachBottom(() => { transition: transform 0.2s; } +.emoji-wrap { + margin-bottom: 12rpx; +} + .emoji { font-size: 56rpx; - margin-bottom: 12rpx; filter: grayscale(100%); opacity: 0.6; } @@ -543,7 +434,7 @@ onReachBottom(() => { display: flex; align-items: center; background-color: #f0f2f7; - border-radius: 100rpx; + border-radius: 16rpx; padding: 8rpx 8rpx 8rpx 32rpx; } @@ -553,11 +444,15 @@ onReachBottom(() => { font-size: 28rpx; } +.input-placeholder { + color: #999; +} + .send-btn { background-color: #4d44f1; color: #fff; font-size: 26rpx; - border-radius: 100rpx; + border-radius: 12rpx; padding: 0 40rpx; height: 64rpx; line-height: 64rpx; @@ -568,63 +463,7 @@ onReachBottom(() => { border: none; } -/* AI 观察员 */ -.ai-observer { - background: #ffffff; - border: 2rpx solid #e0d6ff; - border-radius: 32rpx; - padding: 32rpx; - margin-bottom: 32rpx; - position: relative; - overflow: hidden; -} - -.ai-observer::before { - content: ''; - position: absolute; - top: 0; left: 0; right: 0; bottom: 0; - background: linear-gradient(135deg, rgba(77,68,241,0.05) 0%, rgba(255,255,255,0) 100%); - z-index: 0; -} - -.ai-header { - display: flex; - align-items: center; - margin-bottom: 16rpx; - position: relative; - z-index: 1; -} - -.ai-icon { - width: 36rpx; - height: 36rpx; - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237B46F1'%3E%3Cpath d='M12 2a2 2 0 0 1 2 2c0 .74-.4 1.39-1 1.73V7h5a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h5V5.73A2 2 0 0 1 10 4a2 2 0 0 1 2-2zm-3 8a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm6 0a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3z'/%3E%3C/svg%3E"); - background-size: cover; - margin-right: 12rpx; -} - -.ai-title { - font-size: 28rpx; - font-weight: 800; - color: #7b46f1; -} - -.ai-content { - font-size: 28rpx; - color: #333; - line-height: 1.6; - position: relative; - z-index: 1; -} - /* 大家都在 PK */ -.pk-panel { - background-color: #fff; - border-radius: 32rpx; - padding: 32rpx; - margin-bottom: 32rpx; -} - .pk-header { display: flex; justify-content: space-between; @@ -632,7 +471,7 @@ onReachBottom(() => { margin-bottom: 32rpx; } -.pk-header .panel-title { +.pk-header .section-title { margin-bottom: 0; } @@ -684,8 +523,7 @@ onReachBottom(() => { .vs-text { font-size: 40rpx; font-weight: 900; - color: #d1d5db; - font-style: italic; + color: #a1a1a1; } .pk-bar-wrap { @@ -697,8 +535,8 @@ onReachBottom(() => { } .pk-bar { height: 100%; } -.blue-bar { background-color: #2953ff; } -.yellow-bar { background-color: #ffc107; } +.blue-bar { background-color: #4d44f1; } +.yellow-bar { background-color: #ffe066; } .pk-data-text { display: flex; @@ -707,41 +545,41 @@ onReachBottom(() => { font-weight: bold; } -.blue-text { color: #2953ff; } -.yellow-text { color: #d9a000; } +.blue-text { color: #4d44f1; } +.yellow-text { color: #333; } /* 评论区 */ .comments-section { - background-color: #fff; - border-radius: 32rpx; - padding: 32rpx; + padding: 0; } .tabs-header { display: flex; justify-content: space-between; align-items: center; - margin-bottom: 32rpx; - border-bottom: 2rpx solid #f0f0f0; - padding-bottom: 16rpx; + margin-bottom: 24rpx; + border-bottom: 2rpx solid #f0f2f7; + padding-bottom: 24rpx; } .tabs { display: flex; - gap: 32rpx; + gap: 40rpx; } .tab { - font-size: 32rpx; - color: #666; - font-weight: bold; + font-size: 30rpx; + color: #999; + font-weight: 500; position: relative; - padding-bottom: 16rpx; + padding-bottom: 12rpx; + transition: all 0.3s; } .tab.active { color: #111; - font-size: 36rpx; + font-size: 34rpx; + font-weight: 800; } .tab.active::after { @@ -750,17 +588,22 @@ onReachBottom(() => { bottom: 0; left: 50%; transform: translateX(-50%); - width: 40rpx; - height: 6rpx; - background-color: #111; + width: 32rpx; + height: 8rpx; + background: linear-gradient(90deg, #4d44f1, #8a78ff); border-radius: 4rpx; } .filter-icon { - width: 36rpx; - height: 36rpx; - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='21' x2='4' y2='14'%3E%3C/line%3E%3Cline x1='4' y1='10' x2='4' y2='3'%3E%3C/line%3E%3Cline x1='12' y1='21' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12' y2='3'%3E%3C/line%3E%3Cline x1='20' y1='21' x2='20' y2='16'%3E%3C/line%3E%3Cline x1='20' y1='12' x2='20' y2='3'%3E%3C/line%3E%3Cline x1='1' y1='14' x2='7' y2='14'%3E%3C/line%3E%3Cline x1='9' y1='8' x2='15' y2='8'%3E%3C/line%3E%3Cline x1='17' y1='16' x2='23' y2='16'%3E%3C/line%3E%3C/svg%3E"); + width: 40rpx; + height: 40rpx; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cline x1='4' y1='21' x2='4' y2='14'%3E%3C/line%3E%3Cline x1='4' y1='10' x2='4' y2='3'%3E%3C/line%3E%3Cline x1='12' y1='21' x2='12' y2='12'%3E%3C/line%3E%3Cline x1='12' y1='8' x2='12' y2='3'%3E%3C/line%3E%3Cline x1='20' y1='21' x2='20' y2='16'%3E%3C/line%3E%3Cline x1='20' y1='12' x2='20' y2='3'%3E%3C/line%3E%3Cline x1='1' y1='14' x2='7' y2='14'%3E%3C/line%3E%3Cline x1='9' y1='8' x2='15' y2='8'%3E%3C/line%3E%3Cline x1='17' y1='16' x2='23' y2='16'%3E%3C/line%3E%3C/svg%3E"); background-size: cover; + transition: opacity 0.2s; +} + +.filter-icon:active { + opacity: 0.7; } .comment-list { @@ -771,7 +614,7 @@ onReachBottom(() => { .comment-item { display: flex; padding: 32rpx 0; - border-bottom: 2rpx solid #f5f5f5; + border-bottom: 2rpx solid #f0f2f7; } .comment-item:last-child { @@ -779,12 +622,13 @@ onReachBottom(() => { } .c-avatar { - width: 72rpx; - height: 72rpx; + width: 80rpx; + height: 80rpx; border-radius: 50%; margin-right: 24rpx; - background-color: #eee; + background-color: #f5f6fa; flex-shrink: 0; + border: 2rpx solid #f0f2f7; } .c-content-wrap { @@ -794,58 +638,65 @@ onReachBottom(() => { .c-header { display: flex; justify-content: space-between; - align-items: center; - margin-bottom: 8rpx; + align-items: flex-start; + margin-bottom: 12rpx; } .c-user-info { display: flex; align-items: center; + flex-wrap: wrap; } .c-name { - font-size: 28rpx; - font-weight: bold; - color: #333; - margin-right: 16rpx; + font-size: 30rpx; + font-weight: 800; + color: #111; + margin-right: 12rpx; } .c-badge { display: flex; align-items: center; - background-color: #f5f6fa; - padding: 2rpx 12rpx; - border-radius: 8rpx; + background: linear-gradient(90deg, #f5f6fa, #f0f2f7); + padding: 4rpx 16rpx; + border-radius: 100rpx; } -.b-icon { font-size: 20rpx; margin-right: 4rpx; } +.b-icon { font-size: 20rpx; margin-right: 6rpx; } .b-text { font-size: 20rpx; color: #666; font-weight: bold; } .c-like { display: flex; align-items: center; - color: #666; + color: #999; font-size: 24rpx; + font-weight: 600; } .like-icon { - width: 28rpx; - height: 28rpx; - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3'%3E%3C/path%3E%3C/svg%3E"); + width: 32rpx; + height: 32rpx; + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3'%3E%3C/path%3E%3C/svg%3E"); background-size: cover; margin-right: 8rpx; + transition: transform 0.2s; +} + +.c-like:active .like-icon { + transform: scale(1.1); } .c-time { font-size: 24rpx; - color: #999; + color: #a1a1a1; display: block; margin-bottom: 16rpx; } .c-text { font-size: 30rpx; - color: #222; + color: #333; line-height: 1.6; } @@ -855,4 +706,4 @@ onReachBottom(() => { color: #999; font-size: 24rpx; } - \ No newline at end of file +