|
@@ -0,0 +1,213 @@
|
|
|
|
+<template>
|
|
|
|
+<div>
|
|
|
|
+ <img :src="bg" class="bg" alt="">
|
|
|
|
+ <div class="content">
|
|
|
|
+ <template v-if="isScore!==1">
|
|
|
|
+ <div class="title">恭喜您完成答题!</div>
|
|
|
|
+ <div class="detail">
|
|
|
|
+ 您的得分是: <span :style="font">{{score}}</span>分
|
|
|
|
+ </div>
|
|
|
|
+ <div class="text">排名</div>
|
|
|
|
+ <div class="ranking" :style="backgroundDiv">{{result.rank}}</div>
|
|
|
|
+ <div class="to-list">
|
|
|
|
+ <div class="rank" @click="$router.push({name:'rank'})">
|
|
|
|
+ <img :src="iconRank" style="width:22px;height:23px;padding-left:20px" alt="">
|
|
|
|
+ <div class="list-text">排行榜</div>
|
|
|
|
+ <div class="arrow"></div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div @click="isScore=1" v-if="isScore!==2">
|
|
|
|
+ <img :src="iconStars" style="width:22px;height:20px;padding-left:20px" alt="">
|
|
|
|
+ <div class="list-text">去评分</div>
|
|
|
|
+ <div class="arrow"></div>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div>
|
|
|
|
+ <img :src="iconShare" style="width:17px;height:17px;padding-left:23px" alt="">
|
|
|
|
+ <div class="list-text" style="padding-left:23px">分享</div>
|
|
|
|
+ <div class="arrow"></div>
|
|
|
|
+ </div>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <div class="stars">
|
|
|
|
+ <img :src="(starsNum>=item)?active:stars" alt="" v-for="item in 5" :key="item" @click="starsNum=item">
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <div class="message">您对此次竞赛答题还满意吗?</div>
|
|
|
|
+
|
|
|
|
+ <div class="confim-button" @click="submit">提交</div>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
|
|
+</div>
|
|
|
|
+</template>
|
|
|
|
+
|
|
|
|
+<script>
|
|
|
|
+export default {
|
|
|
|
+ data () {
|
|
|
|
+ return {
|
|
|
|
+ isScore: 0,
|
|
|
|
+ starsNum: 5,
|
|
|
|
+ bg: require('../../public/img/score/bg.png'),
|
|
|
|
+ font: {
|
|
|
|
+ fontSize: '36px',
|
|
|
|
+ fontWeight: 500,
|
|
|
|
+ color: '#FFBD92'
|
|
|
|
+ },
|
|
|
|
+ iconStars: require('../../public/img/score/icon-stars.png'),
|
|
|
|
+ iconRank: require('../../public/img/score/icon-rank.png'),
|
|
|
|
+ iconShare: require('../../public/img/score/icon-share.png'),
|
|
|
|
+ backgroundDiv: {
|
|
|
|
+ backgroundImage: 'url(' + require('../../public/img/score/main-icon.png') + ')'
|
|
|
|
+ },
|
|
|
|
+ stars: require('../../public/img/score/stars.png'),
|
|
|
|
+ active: require('../../public/img/score/stars-active.png'),
|
|
|
|
+ score: localStorage.getItem('score'),
|
|
|
|
+ result: JSON.parse(localStorage.getItem('result')) || {}
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ methods: {
|
|
|
|
+ submit () {
|
|
|
|
+ this.$api.post('/mCompetition/submitReviews', {
|
|
|
|
+ reqdata: {
|
|
|
|
+ assessScore: this.starsNum * 2,
|
|
|
|
+ userAnswerId: this.result.id
|
|
|
|
+ }
|
|
|
|
+ }).then(r => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '评论成功',
|
|
|
|
+ type: 'success'
|
|
|
|
+ })
|
|
|
|
+ this.isScore = 2
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</script>
|
|
|
|
+
|
|
|
|
+<style lang="scss" scoped>
|
|
|
|
+.bg {
|
|
|
|
+ // width: 100%;
|
|
|
|
+ margin: 0;
|
|
|
|
+ padding: 0;
|
|
|
|
+ float: left;
|
|
|
|
+ position: absolute;
|
|
|
|
+ z-index: 0;
|
|
|
|
+ left: 50%;
|
|
|
|
+ transform: translateX(-50%);
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.content {
|
|
|
|
+ position: absolute;
|
|
|
|
+ z-index: 9;
|
|
|
|
+ left: 50%;
|
|
|
|
+ transform: translateX(-50%);
|
|
|
|
+ top: 306px;
|
|
|
|
+ width: 905px;
|
|
|
|
+ min-height: 579px;
|
|
|
|
+ background: #FFFFFF;
|
|
|
|
+ box-shadow: 0px 2px 15px 0px rgba(228, 231, 246, 0.5);
|
|
|
|
+ border-radius: 38px;
|
|
|
|
+ padding-bottom: 27px;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ flex-direction: column;
|
|
|
|
+ margin-bottom: 30px;
|
|
|
|
+
|
|
|
|
+ .title {
|
|
|
|
+ font-size: 24px;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #161616;
|
|
|
|
+ padding-top: 34px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .detail {
|
|
|
|
+ margin-top: 30px;
|
|
|
|
+ width: 420px;
|
|
|
|
+ height: 100px;
|
|
|
|
+ border-radius: 10px;
|
|
|
|
+ background-image: linear-gradient(to right, #3585FF, #5B53EF);
|
|
|
|
+ box-shadow: 0px 12px 20px 0px rgba(29, 75, 146, .3);
|
|
|
|
+ text-align: center;
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
+ line-height: 100px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .text {
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #59598D;
|
|
|
|
+ margin-top: 18px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .ranking {
|
|
|
|
+ margin-top: 9px;
|
|
|
|
+ width: 50px;
|
|
|
|
+ height: 50px;
|
|
|
|
+ font-size: 26px;
|
|
|
|
+ font-weight: 500;
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
+ line-height: 43px;
|
|
|
|
+ background: no-repeat center top;
|
|
|
|
+ background-size: contain;
|
|
|
|
+ text-align: center;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .to-list {
|
|
|
|
+ >div {
|
|
|
|
+ display: flex;
|
|
|
|
+ width: 412px;
|
|
|
|
+ align-items: center;
|
|
|
|
+ border-bottom: 1px solid #EAEFF2;
|
|
|
|
+ padding: 20px 0;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .list-text {
|
|
|
|
+ font-size: 16px;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #000000;
|
|
|
|
+ width: 300px;
|
|
|
|
+ padding: 0 20px;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .arrow {
|
|
|
|
+ width: 10px;
|
|
|
|
+ height: 10px;
|
|
|
|
+ border-right: 2px solid #9BA4A6;
|
|
|
|
+ border-top: 2px solid #9BA4A6;
|
|
|
|
+ transform: rotate(45deg);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .stars {
|
|
|
|
+ padding-top: 128px;
|
|
|
|
+
|
|
|
|
+ >img {
|
|
|
|
+ margin: 0 11px;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .message {
|
|
|
|
+ margin-top: 30px;
|
|
|
|
+ font-size: 24px;
|
|
|
|
+ font-weight: 400;
|
|
|
|
+ color: #333333;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .confim-button {
|
|
|
|
+ margin-top: 40px;
|
|
|
|
+ width: 270px;
|
|
|
|
+ height: 60px;
|
|
|
|
+ border-radius: 30px;
|
|
|
|
+ background-image: linear-gradient(to right, #57A8EF, #6247FF);
|
|
|
|
+ box-shadow: 0px 2px 14px 0px #A799F6;
|
|
|
|
+ font-size: 18px;
|
|
|
|
+ font-weight: 600;
|
|
|
|
+ color: #FFFFFF;
|
|
|
|
+ text-align: center;
|
|
|
|
+ line-height: 60px;
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+</style>
|