🐛 Fixed packaging issues
This commit is contained in:
@@ -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 '学而时习之,不亦说乎!坚持学习必有收获!'
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -544,119 +544,120 @@ onShareAppMessage(() => {
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
color: #1e3a8a;
|
color: #1e3a8a;
|
||||||
|
|
||||||
color: #fbbf24;
|
color: #fbbf24;
|
||||||
}
|
}
|
||||||
&.second {
|
|
||||||
color: #9ca3af;
|
&.second {
|
||||||
}
|
color: #9ca3af;
|
||||||
&.third {
|
}
|
||||||
color: #d97706;
|
|
||||||
}
|
&.third {
|
||||||
|
color: #d97706;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.item-avatar {
|
.item-avatar {
|
||||||
width: 80rpx;
|
width: 80rpx;
|
||||||
height: 80rpx;
|
height: 80rpx;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
margin-right: 24rpx;
|
margin-right: 24rpx;
|
||||||
border: 2rpx solid #e6e6e6;
|
border: 2rpx solid #e6e6e6;
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-info {
|
||||||
|
flex: 1;
|
||||||
|
|
||||||
|
.item-name {
|
||||||
|
display: block;
|
||||||
|
font-size: 28rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #1e3a8a;
|
||||||
|
margin-bottom: 8rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-info {
|
.item-details {
|
||||||
flex: 1;
|
display: flex;
|
||||||
|
gap: 16rpx;
|
||||||
|
|
||||||
.item-name {
|
.item-school,
|
||||||
display: block;
|
.item-class {
|
||||||
font-size: 28rpx;
|
font-size: 22rpx;
|
||||||
font-weight: bold;
|
|
||||||
color: #1e3a8a;
|
|
||||||
margin-bottom: 8rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-details {
|
|
||||||
display: flex;
|
|
||||||
gap: 16rpx;
|
|
||||||
|
|
||||||
.item-school,
|
|
||||||
.item-class {
|
|
||||||
font-size: 22rpx;
|
|
||||||
color: #64748b;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-score {
|
|
||||||
text-align: right;
|
|
||||||
margin-right: 16rpx;
|
|
||||||
|
|
||||||
.score-number {
|
|
||||||
font-size: 32rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #f59e0b;
|
|
||||||
}
|
|
||||||
|
|
||||||
.score-unit {
|
|
||||||
font-size: 20rpx;
|
|
||||||
color: #64748b;
|
color: #64748b;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.trophy-icon {
|
|
||||||
position: absolute;
|
|
||||||
top: 16rpx;
|
|
||||||
right: 16rpx;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty-state {
|
.item-score {
|
||||||
text-align: center;
|
text-align: right;
|
||||||
padding: 120rpx 0;
|
margin-right: 16rpx;
|
||||||
|
|
||||||
.empty-text {
|
.score-number {
|
||||||
display: block;
|
font-size: 32rpx;
|
||||||
font-size: 28rpx;
|
|
||||||
color: #cccccc;
|
|
||||||
margin-top: 24rpx;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// 金字塔展示区域
|
|
||||||
.podium-section {
|
|
||||||
padding: 32rpx;
|
|
||||||
|
|
||||||
.podium-header {
|
|
||||||
text-align: center;
|
|
||||||
margin-bottom: 32rpx;
|
|
||||||
|
|
||||||
.podium-title {
|
|
||||||
font-size: 36rpx;
|
|
||||||
font-weight: bold;
|
|
||||||
color: #1e3a8a;
|
|
||||||
text-shadow: 0 2rpx 4rpx rgba(30, 58, 138, 0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.encouragement-section {
|
|
||||||
padding: 0 32rpx 32rpx;
|
|
||||||
|
|
||||||
.encouragement-card {
|
|
||||||
.encouragement-content {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
gap: 16rpx;
|
|
||||||
|
|
||||||
.encouragement-text {
|
|
||||||
font-size: 26rpx;
|
|
||||||
color: #2d5e3e;
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
text-align: center;
|
color: #f59e0b;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.score-unit {
|
||||||
|
font-size: 20rpx;
|
||||||
|
color: #64748b;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.trophy-icon {
|
||||||
|
position: absolute;
|
||||||
|
top: 16rpx;
|
||||||
|
right: 16rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-state {
|
||||||
|
text-align: center;
|
||||||
|
padding: 120rpx 0;
|
||||||
|
|
||||||
|
.empty-text {
|
||||||
|
display: block;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #cccccc;
|
||||||
|
margin-top: 24rpx;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 金字塔展示区域
|
||||||
|
.podium-section {
|
||||||
|
padding: 32rpx;
|
||||||
|
|
||||||
|
.podium-header {
|
||||||
|
text-align: center;
|
||||||
|
margin-bottom: 32rpx;
|
||||||
|
|
||||||
|
.podium-title {
|
||||||
|
font-size: 36rpx;
|
||||||
|
font-weight: bold;
|
||||||
|
color: #1e3a8a;
|
||||||
|
text-shadow: 0 2rpx 4rpx rgba(30, 58, 138, 0.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.encouragement-section {
|
||||||
|
padding: 0 32rpx 32rpx;
|
||||||
|
|
||||||
|
.encouragement-card {
|
||||||
|
.encouragement-content {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 16rpx;
|
||||||
|
|
||||||
|
.encouragement-text {
|
||||||
|
font-size: 26rpx;
|
||||||
|
color: #2d5e3e;
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user