|
@@ -1,5 +1,5 @@
|
|
|
<template>
|
|
|
- <view>
|
|
|
+ <view style="background-image:url('https://ct.zzxcx.net/ctjk/mp-wx/testScores/bg.png')" class="vh100">
|
|
|
<div class="header-back">
|
|
|
<m-nav-bar
|
|
|
:transparent="true"
|
|
@@ -8,7 +8,7 @@
|
|
|
/>
|
|
|
<div class="user-data">
|
|
|
<div class="left">
|
|
|
- <m-user-avatar />
|
|
|
+ <image class="head" :src="headImage"></image>
|
|
|
<div class="name">
|
|
|
<m-user-name />
|
|
|
<span
|
|
@@ -17,16 +17,21 @@
|
|
|
>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <button
|
|
|
- @click="goMockTest"
|
|
|
- class="continue"
|
|
|
- width="90px"
|
|
|
- height="30px"
|
|
|
- text="继续考试"
|
|
|
- >继续考试</button>
|
|
|
+ <view class="right">
|
|
|
+ <view
|
|
|
+ @click="goMockTest"
|
|
|
+ class="continue"
|
|
|
+ width="90px"
|
|
|
+ height="30px"
|
|
|
+ text="继续考试"
|
|
|
+ >
|
|
|
+ 继续考试
|
|
|
+ <van-icon size="28rpx" color="#498EF5" name="arrow" />
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="summary content-box">
|
|
|
+ <div style="background-image:url('https://ct.zzxcx.net/ctjk/mp-wx/testScores/summaryBg1.png')" class="summary content-box">
|
|
|
<div class="item">
|
|
|
<div>
|
|
|
<span class="number">{{ testScoresList.length }}</span
|
|
@@ -51,20 +56,44 @@
|
|
|
</div>
|
|
|
<div class="test-scores content-box">
|
|
|
<view class="table">
|
|
|
- <view class="flex lh60" style="font-weight:600">
|
|
|
- <view class="w25per">车型</view>
|
|
|
- <view class="w25per">科目</view>
|
|
|
- <view class="w25per">分数</view>
|
|
|
- <view class="w25per">时间</view>
|
|
|
+ <view class="flex lh60" style="font-weight: 600">
|
|
|
+ <view class="w120">车型</view>
|
|
|
+ <view class="w120">科目</view>
|
|
|
+ <view class="w120">分数</view>
|
|
|
+ <view style="text-align: center" class="flex-grow-1">时间</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="flex lh60" v-for="(item, index) in testScoresList" :key="index">
|
|
|
- <view class="w25per">{{ item.type }}</view>
|
|
|
- <view class="w25per">{{ item.kskm }}</view>
|
|
|
- <view class="w25per">{{ item.score }}</view>
|
|
|
- <view class="w25per">{{ item.createTime.split(" ")[0] }}</view>
|
|
|
+ <view
|
|
|
+ class="flex lh100"
|
|
|
+ v-for="(item, index) in testScoresList"
|
|
|
+ :key="index"
|
|
|
+ :style="{
|
|
|
+ background: index % 2 == 1 ? '#fff' : 'rgba(73,142,245,0.15);',
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <view class="w120">{{ item.type }}</view>
|
|
|
+ <view
|
|
|
+ v-if="item.kskm == '科目四' || item.kskm == '科目一'"
|
|
|
+ class="w120"
|
|
|
+ >{{ item.kskm }}</view
|
|
|
+ >
|
|
|
+ <view v-else class="w120">{{
|
|
|
+ item.kskm == 1 ? "科目一" : "科目四"
|
|
|
+ }}</view>
|
|
|
+
|
|
|
+ <view class="w120">{{ item.score }}</view>
|
|
|
+ <view style="text-align: center" class="flex-grow-1">{{
|
|
|
+ item.createTime
|
|
|
+ }}</view>
|
|
|
</view>
|
|
|
</div>
|
|
|
+ <view style="padding: 0 30rpx">
|
|
|
+ <ad
|
|
|
+ class="wxad"
|
|
|
+ :ad-intervals="100"
|
|
|
+ unit-id="adunit-f9ac1a546be5b3f0"
|
|
|
+ ></ad>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -73,15 +102,13 @@
|
|
|
<script>
|
|
|
import api from "@/api/index";
|
|
|
import utils from "@/utils/index";
|
|
|
+import { mapGetters } from "vuex";
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- query:{
|
|
|
-
|
|
|
- },
|
|
|
- testScoresList: [
|
|
|
-
|
|
|
- ],
|
|
|
+ userInfo: uni.getStorageSync("userInfo"),
|
|
|
+ query: {},
|
|
|
+ testScoresList: [],
|
|
|
testScoresInfo: {
|
|
|
maxScore: 0,
|
|
|
avgScore: 0,
|
|
@@ -89,47 +116,82 @@ export default {
|
|
|
},
|
|
|
};
|
|
|
},
|
|
|
+ computed: {
|
|
|
+ headImage() {
|
|
|
+ return this.$store.state.user.userInfo.headImage;
|
|
|
+ },
|
|
|
+ },
|
|
|
onLoad(query) {
|
|
|
+ this.query = query;
|
|
|
this.getTestScoresList();
|
|
|
this.getTestScoresInfo();
|
|
|
- this.query = query
|
|
|
},
|
|
|
methods: {
|
|
|
- goMockTest(){
|
|
|
+ goMockTest() {
|
|
|
uni.navigateTo({
|
|
|
- url:'/otherPages/beforeMockExam/index?'+utils.mapToUrlQuery(this.query)
|
|
|
- })
|
|
|
-
|
|
|
+ url:
|
|
|
+ "/otherPages/beforeMockExam/index?" + utils.mapToUrlQuery(this.query),
|
|
|
+ });
|
|
|
},
|
|
|
getTestScoresInfo() {
|
|
|
api.exam.studentScoreInfoGetScoreInfoAll({}).then((res) => {
|
|
|
-
|
|
|
- this.testScoresInfo = res.data;
|
|
|
+ if (res.data) {
|
|
|
+ this.testScoresInfo = res.data;
|
|
|
+ }
|
|
|
});
|
|
|
},
|
|
|
getTestScoresList() {
|
|
|
- api.exam.studentScoreInfoList({}).then((res) => {
|
|
|
- console.log(res)
|
|
|
- this.testScoresList = res.rows;
|
|
|
- });
|
|
|
+ api.exam
|
|
|
+ .studentScoreInfoList({
|
|
|
+ type: this.query.vehicle,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ console.log(res);
|
|
|
+
|
|
|
+ this.testScoresList = res.rows;
|
|
|
+ });
|
|
|
},
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
-.lh60{
|
|
|
- line-height: 60rpx;
|
|
|
+.vh100{
|
|
|
+ height: 100vh;
|
|
|
+}
|
|
|
+.pl20 {
|
|
|
+ padding-left: 20rpx;
|
|
|
+}
|
|
|
+.pr20 {
|
|
|
+ padding-right: 20rpx;
|
|
|
+}
|
|
|
+.lh60 {
|
|
|
+ line-height: 60rpx;
|
|
|
+}
|
|
|
+.lh100 {
|
|
|
+ line-height: 100rpx;
|
|
|
}
|
|
|
.flex {
|
|
|
display: flex;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+.flex-grow-1 {
|
|
|
+ flex-grow: 1;
|
|
|
+}
|
|
|
.w25per {
|
|
|
width: 25%;
|
|
|
}
|
|
|
+.w20per {
|
|
|
+ width: 25%;
|
|
|
+}
|
|
|
+.w120per {
|
|
|
+ width: 40%;
|
|
|
+}
|
|
|
+.w120 {
|
|
|
+ width: 120rpx;
|
|
|
+}
|
|
|
.header-back {
|
|
|
- width: 375px;
|
|
|
+ width: 750rpx;
|
|
|
padding-bottom: 82px;
|
|
|
background: linear-gradient(180deg, #498ef5 0%, #4da8e6 100%);
|
|
|
border-radius: 0px 0px 82px 82px;
|
|
@@ -137,11 +199,15 @@ export default {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
- padding: 19px 17px 24px;
|
|
|
+ padding-left: 30rpx;
|
|
|
.left {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
+ .head {
|
|
|
+ width: 112rpx;
|
|
|
+ height: 112rpx;
|
|
|
+ }
|
|
|
.name {
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
@@ -150,50 +216,64 @@ export default {
|
|
|
justify-content: space-between;
|
|
|
margin-left: 6px;
|
|
|
.grade {
|
|
|
- font-size: 24px;
|
|
|
+ font-size: 48rpx;
|
|
|
padding: 4px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .continue {
|
|
|
- font-size: 24rpx;
|
|
|
- font-family: PingFang SC;
|
|
|
- font-weight: 400;
|
|
|
- line-height: 60rpx;
|
|
|
- color: #ffffff;
|
|
|
- background: #01c18d;
|
|
|
- border-radius:32rpx;
|
|
|
+ .right {
|
|
|
+ display: inline-block;
|
|
|
+ .continue {
|
|
|
+ width: 200rpx;
|
|
|
+ line-height: 60rpx;
|
|
|
+ background: #ebf8ff;
|
|
|
+ border-radius: 60rpx 0px 0px 60rpx;
|
|
|
+ opacity: 1;
|
|
|
+ font-size: 24rpx;
|
|
|
+ font-family: PingFang SC;
|
|
|
+ font-weight: 400;
|
|
|
+ line-height: 60rpx;
|
|
|
+ color: #ffffff;
|
|
|
+ background: #ebf8ff;
|
|
|
+ color: #498ef5;
|
|
|
+ padding-left: 36rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
.content-box {
|
|
|
- width: 345px;
|
|
|
- background: #ffffff;
|
|
|
+ width: 690rpx;
|
|
|
+
|
|
|
box-shadow: 0px 0px 8px rgba(124, 129, 136, 0.2);
|
|
|
border-radius: 10px;
|
|
|
position: relative;
|
|
|
left: 50%;
|
|
|
transform: translateX(-50%);
|
|
|
top: -82px;
|
|
|
- margin-top: 10px;
|
|
|
+
|
|
|
}
|
|
|
.summary {
|
|
|
display: flex;
|
|
|
justify-content: space-around;
|
|
|
- padding: 25px 30px;
|
|
|
+ padding-top: 60rpx;
|
|
|
+ padding-bottom: 40rpx;
|
|
|
box-sizing: border-box;
|
|
|
+ background-size: 100%;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ width: 642rpx;
|
|
|
+
|
|
|
.item {
|
|
|
font-size: 13px;
|
|
|
font-family: PingFang SC;
|
|
|
font-weight: 400;
|
|
|
line-height: 19px;
|
|
|
- color: #8a9099;
|
|
|
+ color: #B3DBFF;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
align-items: center;
|
|
|
.number {
|
|
|
font-size: 24px;
|
|
|
- color: #0a1a33;
|
|
|
+ color: #fff;
|
|
|
padding: 4px;
|
|
|
}
|
|
|
}
|
|
@@ -206,6 +286,7 @@ export default {
|
|
|
color: #0a1a33;
|
|
|
padding: 15px;
|
|
|
box-sizing: border-box;
|
|
|
+ background: #fff;
|
|
|
.table {
|
|
|
width: 100%;
|
|
|
border-collapse: collapse;
|