mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-10 19:36:47 +08:00
增加热门搜索显示控制
This commit is contained in:
@@ -49,12 +49,12 @@
|
|||||||
<view class="words">
|
<view class="words">
|
||||||
<view class="words-top">
|
<view class="words-top">
|
||||||
<view class="words-title">热门搜索</view>
|
<view class="words-title">热门搜索</view>
|
||||||
<view class="words-clear" @click="cleanHistory()">
|
<view class="words-clear" @click="hotSearch()">
|
||||||
<image src="../../static/images/icon/eye.png" mode="" style="margin-right: 15px;width: 32upx;height: 24upx;"></image>
|
<image src="../../static/images/icon/eye.png" mode="" style="margin-right: 15px;width: 32upx;height: 24upx;"></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="words-items">
|
<view class="words-items" v-if="showHotSearch">
|
||||||
<view v-for="(hw,hwidx) in hotWords" :key="hwidx" @tap="wordSearch(hw)" class="words-item">{{hw}}</view>
|
<view v-for="(hw,hwidx) in hotWords" :key="hwidx" @tap="wordSearch(hw)" class="words-item">{{hw}}</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -266,6 +266,7 @@
|
|||||||
import apiQa from '@/api/modules/qa.js'
|
import apiQa from '@/api/modules/qa.js'
|
||||||
import {toScore} from '@/utils/tools.js'
|
import {toScore} from '@/utils/tools.js'
|
||||||
import apiArticle from '@/api/modules/article.js'
|
import apiArticle from '@/api/modules/article.js'
|
||||||
|
import apiBoeCourse from '@/api/boe/course.js'
|
||||||
export default{
|
export default{
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
@@ -463,6 +464,12 @@
|
|||||||
this.isOpen = true;
|
this.isOpen = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
cleanHistory(){
|
||||||
|
this.clearShow=true;
|
||||||
|
},
|
||||||
|
|
||||||
|
// 热门搜索显示控制
|
||||||
hotSearch(){
|
hotSearch(){
|
||||||
this.showHotSearch = !this.showHotSearch;
|
this.showHotSearch = !this.showHotSearch;
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user