Commit e28ac755 by 冷斌

fix bug

parent c14b682c
...@@ -27,14 +27,14 @@ ...@@ -27,14 +27,14 @@
</style> </style>
<script src="__THEMEW3G__/js/search_media.js"></script> --> <script src="__THEMEW3G__/js/search_media.js"></script> -->
<script src="__THEMEW3G__/js/jquery-1.8.3.min.js"></script> <script src="__THEMEW3G__/js/jquery-1.8.3.min.js"></script>
<link href="__THEMEW3G__/css/common.css" rel="stylesheet"> <link href="__THEMEW3G__/css/common.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.6/lib/index.css" /> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/vant@2.6/lib/index.css" />
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vant@2.6/lib/vant.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/vant@2.6/lib/vant.min.js"></script>
<script src="__THEMEW3G__/js/extension.js" charset="utf-8"></script> <script src="__THEMEW3G__/js/extension.js" charset="utf-8"></script>
<script> <script>
// $(function(){ // $(function(){
// $('#btn_search_site').click(function(){ // $('#btn_search_site').click(function(){
...@@ -86,31 +86,31 @@ ...@@ -86,31 +86,31 @@
</head> </head>
<body> <body>
<div id="app"> <div id="app">
<div class="layout_v"> <div class="layout_v">
<van-sticky> <van-sticky>
<van-search <van-search
v-model="keyword" v-model="keyword"
style="padding-bottom: 0 !important;" style="padding-bottom: 0 !important;"
left-icon="__THEME__/img/serch@3x.png" left-icon="__THEME__/img/serch@3x.png"
@focus="onFocus" @focus="onFocus"
@search="onSearch" @search="onSearch"
shape="round" shape="round"
background="#ffffff" background="#ffffff"
placeholder="请输入关键词..."> placeholder="请输入关键词...">
</van-search> </van-search>
<div v-if="!showHistory" class="tabs_container" style="margin-top: 0.5rem;"> <div v-if="!showHistory" class="tabs_container" style="margin-top: 0.5rem;">
<div @click="onTab(idx)" v-for="(opt, idx) in options" :key="idx" :class="idx == tab ? 'tab_item_selected' : 'tab_item_normal'"> <div @click="onTab(idx)" v-for="(opt, idx) in options" :key="idx" :class="idx == tab ? 'tab_item_selected' : 'tab_item_normal'">
<span>{{opt.title}}</span> <span>{{opt.title}}</span>
</div> </div>
</div> </div>
</van-sticky> </van-sticky>
<template v-if="showList(0)"> <template v-if="showList(0)">
<div @click="onTapCourse(item)" 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">
...@@ -130,7 +130,7 @@ ...@@ -130,7 +130,7 @@
</div> </div>
<span style="margin-top: 35vh;" v-if="options[0].items.length == 0" class="text_14_400 color_999999 self_center">没有找到!</span> <span style="margin-top: 35vh;" v-if="options[0].items.length == 0" class="text_14_400 color_999999 self_center">没有找到!</span>
</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="layout_v home_question_item">
<div v-if="item.price == 0" class="layout_h"> <div v-if="item.price == 0" class="layout_h">
...@@ -151,7 +151,7 @@ ...@@ -151,7 +151,7 @@
</div> </div>
<span style="margin-top: 35vh;" v-if="options[1].items.length == 0" class="text_14_400 color_999999 self_center">没有找到!</span> <span style="margin-top: 35vh;" v-if="options[1].items.length == 0" class="text_14_400 color_999999 self_center">没有找到!</span>
</template> </template>
<template v-if="showList(2)"> <template v-if="showList(2)">
<div @click="onTapGoods(item)" 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
...@@ -171,21 +171,19 @@ ...@@ -171,21 +171,19 @@
</div> </div>
<span style="margin-top: 35vh;" v-if="options[2].items.length == 0" class="text_14_400 color_999999 self_center">没有找到!</span> <span style="margin-top: 35vh;" v-if="options[2].items.length == 0" class="text_14_400 color_999999 self_center">没有找到!</span>
</template> </template>
<!-- 热门搜索 --> <!-- 热门搜索 -->
<div v-if="showHistory" class="layout_v"> <div v-if="showHistory" class="layout_v">
<span class="search_hot_title text_12_400 color_999999">历史搜索:</span> <span class="search_hot_title text_12_400 color_999999">历史搜索:</span>
<div class="layout_h_wrap search_hot_title_flow"> <div class="layout_h_wrap search_hot_title_flow">
<volist name="video" id="vo"> <div v-for="ck in cacheKeyWorlds" @click="onHotKeyword(ck)" class="search_flex_item layout_center">
<div @click="onHotKeyword('{$vo.video_title|mStr=10}')" class="search_flex_item layout_center"> <span class="text_14_400 color_999999">{{ck}}}</span>
<span class="text_14_400 color_999999">{$vo.video_title|mStr=10}</span> </div>
</div>
</volist>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="search-bodyer"> <!-- <div class="search-bodyer">
<div class="goods-eac-box"> <div class="goods-eac-box">
...@@ -289,6 +287,9 @@ ...@@ -289,6 +287,9 @@
return function(idx) { return function(idx) {
return (idx == tab) && !showHot return (idx == tab) && !showHot
} }
},
cacheKeyWorlds:function () {
return ['考研课程', '事业单位考试', '公务员考试'];
} }
}, },
methods: { methods: {
......
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