Browse Source

修改h5样式

aaa 3 years ago
parent
commit
5f7b37e1af

+ 1 - 1
src/views/home/answer/page-answer-recruit-result.vue

@@ -5,7 +5,7 @@
       <div class="exam-item-result-title">本次答对题目数</div>
       <div class="exam-item-result-grade">{{ grades }}</div>
       <div>正确率:{{ accuracyVal }}</div>
-      <div>积分+{{ grades }}</div>
+      <!-- <div>积分+{{ grades }}</div> -->
       <div class="exam-item-detial-button-box">
         <van-button
           class="exam-item-detial-button"

+ 20 - 1
src/views/home/answer/page-answer-special.vue

@@ -23,12 +23,18 @@
                 : item.createdTime
             }}
           </div>
+          <div v-if="!item.available" style="color: #696969">已作答</div>
           <div class="startAnswerBox" @click="clickAnswer(item)">
             <!-- 此处的div不可以注释,否则样式会变,只需要注释时间即可 -->
             <div class="createdTime">
               <!-- {{ formateDatesFun(item.createdTime) }} -->
             </div>
-            <div class="startButtonBox">
+            <div
+              :class="{
+                startButtonBox: item.available,
+                disableButtonBox: !item.available,
+              }"
+            >
               <span class="startText">开始答题</span>
             </div>
           </div>
@@ -40,6 +46,7 @@
 
 <script>
 import { mapState } from "vuex";
+import { Toast } from "vant";
 export default {
   name: "page-answer-special",
   components: {},
@@ -95,6 +102,10 @@ export default {
       }
     },
     clickAnswer(item) {
+      if (!item.available) {
+        Toast("已经完成答题");
+        return;
+      }
       this.$store.commit("updateAnswerItemStore", {
         field: "answerRecruitId",
         value: "special-questions"
@@ -152,6 +163,14 @@ export default {
             color: #fff;
           }
         }
+        .disableButtonBox {
+          border-radius: 2px;
+          background-color: gray;
+          padding: 2px 8px;
+          .startText {
+            color: #fff;
+          }
+        }
       }
     }
   }

+ 17 - 1
src/views/home/answer/page-answer-week.vue

@@ -16,12 +16,15 @@
           <div class="contentItemTitle">
             {{ item.name }}
           </div>
+          <div v-if="!item.available" style="color: #696969">
+              已作答
+          </div>
           <div class="startAnswerBox" @click="clickAnswer(item)">
             <!-- 此处的div不可以注释,否则样式会变,只需要注释时间即可 -->
             <div>
               <!-- {{ formateDatesFun(item.createdTime) }} -->
             </div>
-            <div class="startButtonBox">
+            <div :class="{'startButtonBox':item.available,'disableButtonBox':!item.available}">
               <span class="startText">开始答题</span>
             </div>
           </div>
@@ -33,6 +36,7 @@
 
 <script>
 import { mapState } from "vuex";
+import { Toast } from "vant";
 export default {
   name: "page-answer-week",
   components: {},
@@ -80,6 +84,10 @@ export default {
         });
     },
     clickAnswer(item) {
+      if (!item.available) {
+        Toast("已经完成答题");
+        return;
+      }
       this.$store.commit("updateAnswerItemStore", {
         field: "answerRecruitId",
         value: "weekly-questions"
@@ -135,6 +143,14 @@ export default {
             color: #fff;
           }
         }
+        .disableButtonBox {
+          border-radius: 2px;
+          background-color: gray;
+          padding: 2px 8px;
+          .startText {
+            color: #fff;
+          }
+        }
       }
     }
   }

+ 1 - 1
src/views/home/answer/page-answer.vue

@@ -91,7 +91,7 @@ export default {
         {
           id: 1,
           title: "闯关答题",
-          describe: "10题一关,答对继续,答错出局"
+          describe: "5题一关,答对继续,答错出局"
         }
         // {
         //   id: 2,

+ 1 - 1
src/views/home/exam/page-exam.vue

@@ -13,11 +13,11 @@
             :class="{
               'exam-item-states': true,
               'exam-item-states-gray':
+                item.examStatus === examStatesType.EXAMOVER ||
                 item.examStatus === examStatesType.NOT_START,
               'exam-item-states-green':
                 item.examStatus === examStatesType.STARTED,
               'exam-item-states-red':
-                item.examStatus === examStatesType.EXAMOVER ||
                 item.examStatus === examStatesType.NOTEXAM,
             }"
           >

+ 2 - 1
src/views/home/person/page-person.vue

@@ -16,7 +16,7 @@
             <div class="userName">
               {{ userInfo.nickName }}
             </div>
-            <div class="userGroup">组织:{{ userInfo.group }}</div>
+            <!-- <div class="userGroup">组织:{{ userInfo.group }}</div> -->
           </div>
         </div>
         <div class="userCardLine"></div>
@@ -285,6 +285,7 @@ export default {
           margin-right: 0.5rem;
         }
         .userName {
+          padding-left: 10px;
           font-size: 0.8rem;
         }
         .userGroup {