|
@@ -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;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|