作者 mxd

班级排名

... ... @@ -468,8 +468,9 @@
}, {
"path": "tch_rank/tch_rank",
"style": {
"navigationBarTitleText": "班级排行榜",
"enablePullDownRefresh": false
"navigationBarTitleText": "校园排行榜",
"enablePullDownRefresh": false,
"navigationStyle": "custom"
}
}, {
... ...
<template>
<view class="container">
<CustomReturn title="听课教室选座" color="#323232" :bgColor="bgColor" :isShowBreak="false">
<CustomReturn title="首页" color="#323232" :bgColor="bgColor" :isShowBreak="false">
<template v-slot:left>
<view class="set-up">
<image src="/static/imagesV2/tch_index/icon9.png" mode="aspectFill"></image>
... ...
<template>
<view class="wrap_box">
<!-- <uParse v-if="datas" :content="datas"></uParse> -->
<image class="ph_banner" src="/static/images/phb.png" mode="aspectFill"></image>
<view class="ph_box">
<view class="ph_tit dis_flex aic">
<view class="ph_d1">
排名
</view>
<view class="ph_d2">
班级
</view>
<view class="ph_d3">
得分
</view>
</view>
<view v-for="(item,index) in datas" class="ph_li">
<view class="ph_d1">
<image v-if="item.key==1" src="/static/images/ph.png" mode="aspectFit"></image>
<image v-else-if="item.key==2" src="/static/images/ph2.png" mode="aspectFit"></image>
<image v-else-if="item.key==3" src="/static/images/ph3.png" mode="aspectFit"></image>
<text v-else>{{item.key}}</text>
</view>
<view class="ph_d2">
{{item.title}}
</view>
<view class="ph_d3">
{{item.num}}分
</view>
</view>
<view class="ph_li ph_li_b">
<view class="ph_d1">
<image v-if="mydata.key==0" src="/static/images/ph.png" mode="aspectFit"></image>
<image v-else-if="mydata.key==1" src="/static/images/ph2.png" mode="aspectFit"></image>
<image v-else-if="mydata.key==2" src="/static/images/ph3.png" mode="aspectFit"></image>
<text v-else>{{mydata.key}}</text>
<!-- <text>{{mydata.key}}</text> -->
</view>
<view class="ph_d2">
{{mydata.title}}<text>本班</text>
</view>
<view class="ph_d3">
{{mydata.num}}分
<CustomReturn title="校园排行榜" color="#fff" :bgColor="bgColor">
</CustomReturn>
<view class="bg-img">
<image src="/static/imagesV2/icon18.png" mode="aspectFill"></image>
</view>
<PaddingTopB>
<view class="main">
<view class="card">
<view class="head">
<view class="icon">
<image src="/static/imagesV2/icon19.png" mode="aspectFill"></image>
</view>
<view class="title">
班级考勤排名
</view>
<view class="icon">
<image src="/static/imagesV2/icon19s.png" mode="aspectFill"></image>
</view>
</view>
<view class="list">
<view class="item" v-for="(item,index) in datas">
<view class="item-index">
<image v-if="item.key==1" src="/static/imagesV2/icon20.png" mode="aspectFit"></image>
<image v-else-if="item.key==2" src="/static/imagesV2/icon21.png" mode="aspectFit"></image>
<image v-else-if="item.key==3" src="/static/imagesV2/icon22.png" mode="aspectFit"></image>
<text v-else>{{item.key}}</text>
</view>
<view class="item-title">
{{item.title}}
</view>
<view class="item-val">
{{item.num}}
</view>
<view class="item-unit">
</view>
</view>
</view>
<view class="footer">
<view class="item">
<view class="item-index">
<image v-if="mydata.key==1" src="/static/imagesV2/icon20.png" mode="aspectFit"></image>
<image v-else-if="mydata.key==2" src="/static/imagesV2/icon21.png" mode="aspectFit"></image>
<image v-else-if="mydata.key==3" src="/static/imagesV2/icon22.png" mode="aspectFit"></image>
<text v-else>{{mydata.key}}</text>
</view>
<view class="item-title">
{{mydata.title}}
</view>
<view class="item-val">
{{mydata.num}}
</view>
<view class="item-unit">
</view>
</view>
</view>
</view>
</view>
</view>
<!-- 阻止滑动 -->
<!-- <view @touchmove.stop.prevent='test'></view> -->
</PaddingTopB>
</view>
</template>
... ... @@ -55,10 +81,17 @@
mapState,
mapMutations
} from 'vuex'
import CustomReturn from "@/components/CustomReturn/index.vue"
import PaddingTopB from "@/components/PaddingTopB/index.vue"
var that
export default {
components: {
CustomReturn,
PaddingTopB
},
data() {
return {
bgColor: 'transparent',
options:'',
datas:'',
mydata:''
... ... @@ -67,6 +100,13 @@
computed: {
...mapState(['hasLogin', 'forcedLogin', 'userName', 'userinfo','nowtime']),
},
onPageScroll(e) {
if(e.scrollTop > 0 ) {
this.bgColor = '#3384fc'
}else {
this.bgColor = 'transparent'
}
},
onLoad(e) {
that=this
that.options=e||{}
... ... @@ -161,87 +201,95 @@
// #ifdef H5
min-height: calc(100vh - 44px);
// #endif
background: #F8F8F8;
background: #3384fc;
}
.ph_banner{
.bg-img {
height: 100vh;
position: absolute;
width: 100%;
height: 340rpx;
position: relative;
z-index: 1;
margin-bottom: -40rpx;
}
.ph_box{
position: relative;
z-index: 2;
background: #FFFFFF;
border-radius: 30rpx 30rpx 0 0;
padding: 30rpx 30rpx 130rpx;
min-height: calc(100vh - 300rpx);
// #ifdef H5
min-height: calc(100vh - 44px - 300rpx);
// #endif
top: 0;
}
.ph_tit{
font-size: 28rpx;
color: #929399;
height: 60rpx;
.ph_d1{
width: 60rpx;
margin-right: 40rpx;
}
.ph_d2{
flex: 1;
margin-right: 40rpx;
text-align: left;
}
.ph_d3{
text-align: right;
}
.main {
width: 100%;
padding: 25rpx 25rpx 135rpx;
box-sizing: border-box;
margin-top: 250rpx;
}
.ph_li{
font-size: 32rpx;
color: #545C71;
height: 120rpx;
display: flex;
align-items: center;
.ph_d1{
width: 60rpx;
margin-right: 40rpx;
.card {
background-color: #fff;
border-radius: 20px;
overflow: hidden;
.head {
display: flex;
align-items: center;
justify-content: center;
font-size: 30rpx;
image{
width: 60rpx;
height: 60rpx;
padding: 50rpx 0 30rpx;
background: linear-gradient(to bottom, #AEC7FF 0%, #FFFFFF 100%);
.icon {
width: 40rpx;
height: 40rpx;
}
.title {
font-size: 32rpx;
font-family: PingFang SC;
font-weight: bold;
color: #323232;
margin: 0 20rpx;
}
}
.ph_d2{
flex: 1;
margin-right: 40rpx;
text-align: left;
text{
font-size: 28rpx;
color: #2D81FF;
margin-left: 10rpx;
padding: 5rpx 14rpx;
background: rgba(45, 129, 255, .1);
border-radius: 10rpx;
.list,
.footer{
padding: 0 30rpx;
.item {
display: flex;
align-items: center;
font-family: PingFang SC;
padding: 30rpx 0;
border-bottom: 1px solid #FAFBFA;
padding: 30rpx 0;
&:last-child {
border: 0;
}
&-index {
width: 50rpx;
height: 50rpx;
font-size: 30rpx;
font-weight: bold;
color: #979797;
display: flex;
align-items: center;
justify-content: center;
}
&-title {
flex: 1;
margin: 0 20rpx;
font-size: 28rpx;
font-weight: 500;
color: #323232;
}
&-val {
font-size: 32rpx;
font-weight: bold;
color: #2D81FF;
}
&-unit {
font-size: 26rpx;
color: #646464;
}
}
}
.ph_d3{
text-align: right;
.footer {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
background-color: #fff;
padding: 0 55rpx;
box-sizing: border-box;
}
}
.ph_li_b{
position: fixed;
bottom: 0;
z-index: 900;
left: 0;
width: 100%;
background: #fff;
padding: 0 30rpx;
box-shadow: 0px 3rpx 8px 0px rgba(207, 207, 207, 0.5);
}
</style>
... ...