xtz il y a 4 ans
Parent
commit
533d54fcba

+ 1 - 1
answer/src/common/utils/utils.js

@@ -19,7 +19,7 @@ export default {
   },
   formatTime (time) {
     var h = Math.floor(time / 60 / 60)
-    var s = Math.floor(time / 60)
+    var s = Math.floor(time / 60 % 60)
     var t = time % 60 % 60
     return (h > 9 ? h : '0' + h) + ':' + (s > 9 ? s : '0' + s) + ':' + (t > 9 ? t : '0' + t)
   },

+ 2 - 3
answer/src/views/contest.vue

@@ -36,11 +36,10 @@
         </div>
         <div class="bounced" :style="conTop" v-if="submitState">
             <i class="el-icon-error" @click="submitState = 0"></i>
-            <div :style="{'height':'50px'}" v-if="!(submitState===1)"></div>
             <img :src="icon" alt="">
             <div class="bounced-message">{{submitState===1?'您未答完全部题,确认提交吗?':'提交已成功!'}}</div>
             <div class="bounced-button" @click="submit(true)" v-if="submitState===1">提交</div>
-            <!-- <div class="bounced-button" v-else>返回</div> -->
+            <div class="bounced-button" @click="$router.push({name:'score'})" v-else>确定</div>
         </div>
     </div>
 </div>
@@ -144,7 +143,7 @@ export default {
         this.submitState = 2
         // this.results = r.object
         localStorage.setItem('score', paperScore)
-        localStorage.setItem('result', r.object)
+        localStorage.setItem('result', JSON.stringify(r.object))
         clearInterval(this.timer)
       }).catch(e => {
         clearInterval(this.timer)

+ 60 - 4
answer/src/views/rank.vue

@@ -1,6 +1,12 @@
 <template>
-<div>
-    <img :src="bg" class="bg" alt="">
+<div @click="show=false">
+    <div class="bg" :style="backgroundDiv">
+        <div class="help" @click.stop="show=true"></div>
+        <div class="help-text" :style="background1" v-if="show">
+            <div class="help-title">{{['','个人','区','学校'][page]}}排名说明</div>
+            <div class="help-message">以竞赛时间范围内{{['','个人最好成绩','区域平均分','学校成绩平均分'][page]}}排序高低,如分数并列,则按照答题时间的快慢平均值排序;</div>
+        </div>
+    </div>
     <div class="nav-List">
         <div :class="page===item&&'active'" v-for="item in 3" :key="item" @click="page=item">{{['','个人','区','学校'][item]}}排名</div>
     </div>
@@ -28,10 +34,16 @@ export default {
   data () {
     return {
       page: 1,
-      bg: require('../../public/img/rank/bg.png'),
+      backgroundDiv: {
+        backgroundImage: 'url(' + require('../../public/img/rank/bg.png') + ')'
+      },
+      background1: {
+        backgroundImage: 'url(' + require('../../public/img/rank/test-area.png') + ')'
+      },
       page2: require('../../public/img/rank/page-2.png'),
       page3: require('../../public/img/rank/page-3.png'),
-      rankList: []
+      rankList: [],
+      show: false
     }
   },
   computed: {
@@ -63,6 +75,8 @@ export default {
 
 <style lang="scss" scoped>
 .bg {
+    width: 1024px;
+    height: 344px;
     margin: 0;
     padding: 0;
     float: left;
@@ -70,6 +84,43 @@ export default {
     z-index: 0;
     left: 50%;
     transform: translateX(-50%);
+    background: no-repeat center top;
+    background-size: contain;
+
+    .help {
+        position: absolute;
+        top: 92px;
+        right: 220px;
+        width: 38px;
+        height: 38px;
+        background-color: transparent;
+    }
+
+    .help-text {
+        position: absolute;
+        top: 140px;
+        right: 70px;
+        width: 198px;
+        height: 98px;
+        background: no-repeat center top;
+        background-size: contain;
+        opacity: 0.8;
+
+        .help-title {
+            margin: 15px 0 0 10px;
+            font-size: 14px;
+            font-weight: 500;
+            color: #FFFFFF;
+        }
+
+        .help-message {
+            margin: 2px 6px 8px 10px;
+            line-height: 17px;
+            font-size: 12px;
+            font-weight: 400;
+            color: #FFFFFF;
+        }
+    }
 }
 
 .content {
@@ -190,4 +241,9 @@ export default {
         background: #FA7D01;
     }
 }
+
+.help {
+    position: absolute;
+    top: 100px;
+}
 </style>

+ 2 - 2
answer/src/views/score.vue

@@ -22,11 +22,11 @@
                     <div class="arrow"></div>
                 </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>-->
             </div>
         </template>
         <template v-else>