🐛 Fixed packaging issues

This commit is contained in:
2025-09-15 18:56:26 +08:00
parent ee0fa309ca
commit abedd2bc71

View File

@@ -1,10 +1,10 @@
<route lang="json"> <route lang="json">
{ {
"style": { "style": {
"navigationBarTitleText": "排行榜", "navigationBarTitleText": "排行榜",
"navigationBarBackgroundColor": "#2D5E3E", "navigationBarBackgroundColor": "#2D5E3E",
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
} }
</route> </route>
@@ -20,7 +20,10 @@
/> />
<view class="user-info"> <view class="user-info">
<text class="user-name">{{ userRankInfo.studentName }}</text> <text class="user-name">{{ userRankInfo.studentName }}</text>
<text class="user-school">{{ userRankInfo.schoolName }} {{ userRankInfo.gradeName }} {{ userRankInfo.className }}</text> <text class="user-school">{{ userRankInfo.schoolName }} {{ userRankInfo.gradeName }} {{
userRankInfo.className
}}
</text>
<view class="score-info"> <view class="score-info">
<view class="score-item"> <view class="score-item">
<text class="score-label">总积分</text> <text class="score-label">总积分</text>
@@ -60,7 +63,7 @@
:class="{ active: currentScope === scope.key }" :class="{ active: currentScope === scope.key }"
@tap="switchScope(scope.key)" @tap="switchScope(scope.key)"
> >
<uni-icons :type="scope.icon" size="16" :color="currentScope === scope.key ? '#FFFFFF' : '#2D5E3E'" /> <uni-icons :type="scope.icon" size="16" :color="currentScope === scope.key ? '#FFFFFF' : '#2D5E3E'"/>
<text class="scope-text">{{ scope.name }}</text> <text class="scope-text">{{ scope.name }}</text>
<view v-if="getUserRankByScope(scope.key)" class="user-rank-badge"> <view v-if="getUserRankByScope(scope.key)" class="user-rank-badge">
<text class="rank-text">{{ getUserRankByScope(scope.key) }}</text> <text class="rank-text">{{ getUserRankByScope(scope.key) }}</text>
@@ -170,7 +173,7 @@
<!-- 空状态 --> <!-- 空状态 -->
<view v-if="currentRankingList.length === 0" class="empty-state"> <view v-if="currentRankingList.length === 0" class="empty-state">
<uni-icons type="list" size="60" color="#CCCCCC" /> <uni-icons type="list" size="60" color="#CCCCCC"/>
<text class="empty-text">暂无排行数据</text> <text class="empty-text">暂无排行数据</text>
</view> </view>
</scroll-view> </scroll-view>
@@ -180,7 +183,7 @@
<view class="encouragement-section"> <view class="encouragement-section">
<ZhuziCard class="encouragement-card"> <ZhuziCard class="encouragement-card">
<view class="encouragement-content"> <view class="encouragement-content">
<uni-icons type="star" size="20" color="#DAA520" /> <uni-icons type="star" size="20" color="#DAA520"/>
<text class="encouragement-text">{{ encouragementText }}</text> <text class="encouragement-text">{{ encouragementText }}</text>
</view> </view>
</ZhuziCard> </ZhuziCard>
@@ -189,8 +192,8 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import type { RankingItem } from '@/mocks/ranking' import type {RankingItem} from '@/mocks/ranking'
import { computed, ref } from 'vue' import {computed, ref} from 'vue'
import { import {
mockCityRanking, mockCityRanking,
mockClassRanking, mockClassRanking,
@@ -207,17 +210,17 @@ const currentScope = ref<'class' | 'grade' | 'school' | 'district' | 'city'>('cl
// 时间维度选项卡 // 时间维度选项卡
const timeTabs = [ const timeTabs = [
{ key: 'total' as const, name: '总榜' }, {key: 'total' as const, name: '总榜'},
{ key: 'month' as const, name: '月榜' }, {key: 'month' as const, name: '月榜'},
] ]
// 范围维度选项卡 // 范围维度选项卡
const scopeTabs = [ const scopeTabs = [
{ key: 'class' as const, name: '班级榜', icon: 'person' }, {key: 'class' as const, name: '班级榜', icon: 'person'},
{ key: 'grade' as const, name: '年级榜', icon: 'persons' }, {key: 'grade' as const, name: '年级榜', icon: 'persons'},
{ key: 'school' as const, name: '全校榜', icon: 'home' }, {key: 'school' as const, name: '全校榜', icon: 'home'},
{ key: 'district' as const, name: '全区榜', icon: 'location' }, {key: 'district' as const, name: '全区榜', icon: 'location'},
{ key: 'city' as const, name: '全市榜', icon: 'map' }, {key: 'city' as const, name: '全市榜', icon: 'map'},
] ]
// 当前排行榜数据 // 当前排行榜数据
@@ -277,14 +280,11 @@ const encouragementText = computed(() => {
if (userRank <= 3) { if (userRank <= 3) {
return '太棒了!您已进入前三名,继续保持!' return '太棒了!您已进入前三名,继续保持!'
} } else if (userRank <= 10) {
else if (userRank <= 10) {
return '表现优秀!向前三名发起冲击吧!' return '表现优秀!向前三名发起冲击吧!'
} } else if (userRank <= 20) {
else if (userRank <= 20) {
return '成绩不错!再接再厉进入前十名!' return '成绩不错!再接再厉进入前十名!'
} } else {
else {
return '学而时习之,不亦说乎!坚持学习必有收获!' return '学而时习之,不亦说乎!坚持学习必有收获!'
} }
}) })
@@ -546,9 +546,11 @@ onShareAppMessage(() => {
color: #fbbf24; color: #fbbf24;
} }
&.second { &.second {
color: #9ca3af; color: #9ca3af;
} }
&.third { &.third {
color: #d97706; color: #d97706;
} }
@@ -621,10 +623,10 @@ onShareAppMessage(() => {
} }
} }
} }
} }
// 金字塔展示区域 // 金字塔展示区域
.podium-section { .podium-section {
padding: 32rpx; padding: 32rpx;
.podium-header { .podium-header {
@@ -638,9 +640,9 @@ onShareAppMessage(() => {
text-shadow: 0 2rpx 4rpx rgba(30, 58, 138, 0.1); text-shadow: 0 2rpx 4rpx rgba(30, 58, 138, 0.1);
} }
} }
} }
.encouragement-section { .encouragement-section {
padding: 0 32rpx 32rpx; padding: 0 32rpx 32rpx;
.encouragement-card { .encouragement-card {
@@ -659,6 +661,5 @@ onShareAppMessage(() => {
} }
} }
} }
}
} }
</style> </style>