feat: 考试排行榜页面

This commit is contained in:
杨航
2025-08-20 13:50:40 +08:00
parent 7a36fab884
commit a4cd8206fa
11 changed files with 319 additions and 7 deletions
+1 -1
View File
@@ -32,7 +32,7 @@
<view class="mr-10">已学</view>
<view class="c-000">{{ form.styParaGraphNum || 0 }}</view>
</view>
<view class="num-item examination">
<view class="num-item examination" @click="common.navigateTo('/pages/examRanking/index?crsId=' + crsId)">
<image
class="title-icon"
src="/src/static/images/courseDetail/charts.png"
+318 -6
View File
@@ -1,6 +1,61 @@
<template>
<view>
<view class="exam-ranking">
<image src="@/static/images/examRanking/bg.png" mode="aspectFit" class="bg-box"></image>
<view class="ranking-box">
<view class="nav-div">
<view class="back_div">
<view class="back-icon"></view>
</view>
</view>
<view class="title-view">
<!-- <view class="title-info">考试排行榜</view> -->
<image class="title-image" src="@/static/images/examRanking/title.png" mode="aspectFit"></image>
<view class="title-desc">吾日三省吾身传不习乎</view>
<image class="cup-image" src="@/static/images/examRanking/cup.png" mode="aspectFit"></image>
</view>
<view class="ranking-body">
<view class="list-header list-item">
<view class="rank-column">排名</view>
<view class="user-column">用户名/所属机构</view>
<view class="score-column">最高分</view>
</view>
<scroll-view :scroll-y="true" class="scroll-items-view">
<view v-for="(item,index) in 60" :class="['list-item', 'item-'+(index+1)]">
<view class="rank-column">
{{index + 1}}
</view>
<view class="user-column">
<view class="avatar-box">
<image-preview class="avatar-image" :imgId="item" mode="aspectFit"></image-preview>
</view>
<view class="user-name">{{'李想'}}</view>
<view class="user-org">{{'吉林银行白城分行'}}</view>
</view>
<view class="score-column">{{100 - index}}</view>
</view>
</scroll-view>
</view>
<view class="ranking-self">
<view class="list-header list-item">
<view class="rank-column">我的排名</view>
</view>
<view class="list-item item-me">
<view class="rank-column">
{{21}}
</view>
<view class="user-column">
<view class="avatar-box">
<image-preview class="avatar-image" :imgId="item" mode="aspectFit"></image-preview>
</view>
<view class="user-name">{{'李想'}}</view>
<view class="user-org">{{'吉林银行白城分行'}}</view>
</view>
<view class="score-column">{{22}}</view>
</view>
</view>
</view>
</view>
</template>
@@ -8,15 +63,272 @@
export default {
data() {
return {
}
},
methods: {
}
}
</script>
<style>
<style scoped lang="scss">
$top-height: var(--status-bar-height);
</style>
.exam-ranking {
position: relative;
height: 100vh;
width: 100vw;
overflow: hidden;
box-sizing: border-box;
padding-top: $top-height;
// background:url(@/static/images/examRanking/bg.png) no-repeat top center;
.bg-box {
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 412rpx;
z-index: 1;
}
.ranking-box {
height: calc(100% - $top-height);
overflow: hidden;
position: absolute;
top: $top-height;
width: 100%;
z-index: 2;
}
.nav-div {
position: relative;
overflow: hidden;
height: 70rpx;
.back_div {
margin-right: 10rpx;
position: absolute;
left: 25rpx;
top: 0;
padding: 15rpx;
.back-icon {
position: relative;
width: 40rpx;
height: 40rpx;
cursor: pointer;
}
.back-icon::before,
.back-icon::after {
content: '';
position: absolute;
transition: all 0.3s ease;
}
.back-icon::after {
top: 25%;
left: 25%;
width: 40%;
height: 40%;
border-top: 4rpx solid #000;
border-left: 4rpx solid #000;
transform: rotate(-45deg);
}
}
}
.title-view {
height: 180rpx;
position: relative;
padding-left: 79rpx;
padding-top: 20rpx;
.cup-image {
position: absolute;
right: 90rpx;
bottom: 0;
width: 178rpx;
height: 159rpx;
}
.title-desc {
color: #666;
line-height: 34rpx;
font-size: 25rpx;
}
.title-image {
width: 308rpx;
height: 88rpx;
}
}
.ranking-body {
height: calc(100% - 170rpx - 180rpx - 70rpx);
overflow: hidden;
background-color: #fff;
border-radius: 31rpx 31rpx 0 0;
padding-top: 20rpx;
box-sizing: border-box;
.scroll-items-view{
height: calc(100% - 54rpx);
}
}
.list-item {
height: 108rpx;
border-bottom: 2rpx solid #efefef;
overflow: hidden;
&.list-header {
height: 54rpx;
line-height: 54rpx;
color: #999;
font-size: 25rpx;
border-bottom: 0;
.rank-column {
height: 54rpx;
line-height: 54rpx;
color: #999;
font-weight: normal;
font-size: 25rpx;
font-style: initial;
text-indent: 0;
}
.user-column {
padding: 0;
}
.score-column {
line-height: 54rpx;
color: #999;
font-weight: normal;
font-size: 25rpx;
}
}
&.item-1 {
border-bottom: 0;
margin-bottom: 8rpx;
background: linear-gradient(90deg, #fbf9f5 0%, #fffffd 100%);
.rank-column{
color: #ffffff00;
background: url(@/static/images/examRanking/no-1.png) no-repeat ;
background-position: 40rpx center;
background-size: 44rpx 66rpx;
text-indent: 8rpx;
}
}
&.item-2 {
border-bottom: 0;
margin-bottom: 8rpx;
background: linear-gradient(90deg, #f4f8f9 0%, #f7fbfe 100%);
.rank-column{
color: #ffffff00;
background: url(@/static/images/examRanking/no-2.png) no-repeat ;
background-position: 40rpx center;
background-size: 44rpx 66rpx;
text-indent: 8rpx;
}
}
&.item-3 {
border-bottom: 0;
margin-bottom: 8rpx;
background: linear-gradient(90deg, #faf6f5 0%, #fcfbfc 100%);
.rank-column{
color: #ffffff00;
background: url(@/static/images/examRanking/no-3.png) no-repeat ;
background-position: 40rpx center;
background-size: 44rpx 66rpx;
text-indent: 8rpx;
}
}
&.item-me{
border-bottom: 0;
.rank-column {
color: #06f;
}
}
.rank-column {
width: 170rpx;
padding-left: 40rpx;
float: left;
font-weight: 600;
line-height: 92rpx;
height: 108rpx;
color: #333;
font-size: 38rpx;
font-style: italic;
text-indent: 8rpx;
}
.user-column {
width: 450rpx;
float: left;
padding: 15rpx 0;
.avatar-box{
width: 77rpx;
height: 77rpx;
overflow: hidden;
float: left;
background-color: #eee;
border-radius: 50%;
.avatar-image{
width: 77rpx;
height: 77rpx;
}
}
.user-name{
float: left;
width: calc(100% - 77rpx);
padding-left: 18rpx;
padding-right: 18rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 40rpx;
line-height: 40rpx;
font-size: 29rpx;
color: #000;
font-weight: 500;
}
.user-org{
float: left;
width: calc(100% - 77rpx);
padding-left: 18rpx;
padding-right: 18rpx;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 34rpx;
line-height: 34rpx;
font-size: 25rpx;
color: #999;
}
}
.score-column {
width: 75rpx;
text-align: right;
float: left;
font-weight: 600;
line-height: 108rpx;
color: #333;
font-size: 31rpx;
}
}
.ranking-self {
height: 170rpx;
overflow: hidden;
background-color: #f5f9ff;
padding-top: 4rpx;
}
}
</style>
Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB