Commit c0e5b6a2 by 陈超

T

parent f9b5ddb6
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
</van-sticky> </van-sticky>
<template v-if="showList(0)"> <template v-if="showList(0)">
<div v-for="(item, idx) in options[0].items" :key="idx" class="home_class_item layout_v"> <div @click="onTapCourse(item)" v-for="(item, idx) in options[0].items" :key="idx" class="home_class_item layout_v">
<div class="layout_h"> <div class="layout_h">
<van-image <van-image
style="margin-right: 0.75rem;" style="margin-right: 0.75rem;"
...@@ -142,7 +142,7 @@ ...@@ -142,7 +142,7 @@
</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 @click="onTapQuestion(item)" v-for="(item, idx) in options[1].items" :key="idx" class="layout_v home_question_item">
<div class="layout_h"> <div 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" style="margin-right: 1.5rem;margin-left: 0.625rem;">2020年国家公务员《行测》试卷(省级)-名师版</span> <span class="text_14_600 color_333333 weight_full van-multi-ellipsis--l2" style="margin-right: 1.5rem;margin-left: 0.625rem;">2020年国家公务员《行测》试卷(省级)-名师版</span>
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
</template> </template>
<template v-if="showList(2)"> <template v-if="showList(2)">
<div v-for="(item, idx) in options[2].items" :key="idx" class="home_item_goods layout_h"> <div @click="onTapGoods(item)" v-for="(item, idx) in options[2].items" :key="idx" class="home_item_goods layout_h">
<van-image <van-image
style="margin-right: 0.75rem;" style="margin-right: 0.75rem;"
height="68" height="68"
...@@ -307,11 +307,24 @@ ...@@ -307,11 +307,24 @@
onSearch: function() { onSearch: function() {
this.showHistory = false this.showHistory = false
this.searchCourse() this.searchCourse()
this.searchQuestion()
this.searchGoods() this.searchGoods()
}, },
onTab: function(idx) { onTab: function(idx) {
this.tab = idx this.tab = idx
}, },
//点击视频
onTapCourse: function(item) {
},
//点击真题
onTapQuestion: function(item) {
},
//点击实物
onTapGoods: function(item) {
},
searchCourse: function() { searchCourse: function() {
let that = this let that = this
let on = "{$marketConf['order_switch']}" == 1 let on = "{$marketConf['order_switch']}" == 1
...@@ -335,7 +348,16 @@ ...@@ -335,7 +348,16 @@
}) })
}, },
searchQuestion: function() { searchQuestion: function() {
let that = this
$.ajax({
type: "GET",
url: "{:U('exams/Index/paper')}"+"&search=" + that.keyword,
dataType: "json",
success: function(res) {
let array = res.data.length > 0 ? res.data : []
console.log(data)
}
})
}, },
searchGoods: function() { searchGoods: function() {
let that = this let that = this
......
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