Commit 1745cfaf by 冷斌

fix bug

parent 126f139e
...@@ -154,7 +154,8 @@ ...@@ -154,7 +154,8 @@
</template> </template>
<template v-if="showList(1)"> <template v-if="showList(1)">
<div v-for="(item, idx) in options[1].items" :key="idx" class="layout_v home_question_item"> <div v-for="(item, idx) in options[1].items" :key="idx" class="home_question_item">
<!--
<div v-if="item.price == 0" class="layout_h"> <div v-if="item.price == 0" class="layout_h">
<div class="home_item_mark_green layout_center">免费</div> <div class="home_item_mark_green layout_center">免费</div>
<span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" <span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2"
...@@ -172,6 +173,24 @@ ...@@ -172,6 +173,24 @@
<van-image src="__THEME__/img/down_load_icon.png" width="13" height="16"></van-image> <van-image src="__THEME__/img/down_load_icon.png" width="13" height="16"></van-image>
</div> </div>
<div class="home_divider divider"></div> <div class="home_divider divider"></div>
-->
<div class="class_left layout_v weight_full">
<div class="layout_h">
<div v-if="item.price > 0" class="mark_orange layout_center">付费</div>
<div v-if="item.price == 0" class="mark_green layout_center">免费</div>
<span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-left: 0.625rem;">{{item.title}}</span>
</div>
<div class="layout_h" style="margin-top: 1.25rem;">
<span class="text_12_400 color_999999">题数:{{item.count}}</span>
<span class="class_attr text_12_400 color_999999">推荐用时:{{item.time}}m</span>
<span class="class_attr text_12_400 color_999999">{{item.person}}</span>
</div>
</div>
<div class="class_right layout_center">
<div @click="onTapQuestion(item)" v-if="item.price == 0 || item.is_buy" class="button_green layout_center">开始做题</div>
<div @click="onTapQuestion(item)" v-else-if="item.price > 0" class="button_orange layout_center">预览</div>
</div>
</div> </div>
<!-- 下载提示 --> <!-- 下载提示 -->
...@@ -373,11 +392,16 @@ ...@@ -373,11 +392,16 @@
}) })
return return
} }
console.log(item); if (item.hasQuestion) {
return ;
if (item.price == 0) {
let url = "{:U('exams/index/examsroom')}" + "&paper_id=" + item.id + "&joinType=1" let url = "{:U('exams/index/examsroom')}" + "&paper_id=" + item.id + "&joinType=1"
window.location.href = url window.location.href = url;
} else {
}
if (item.price == 0) {
} else { } else {
$.ajax({ $.ajax({
type: "POST", type: "POST",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment