|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<div class="wrap" :class="{index: !keyword, result: keyword}"> |
|
|
|
<div class="wrap index" :class="{result: keyword}"> |
|
|
|
<img class="screen" src="@/assets/img/index/index0.png" alt="首页"> |
|
|
|
<img class="screen" src="@/assets/img/index/index0.png" alt="首页"> |
|
|
|
<div class="banner"> |
|
|
|
<div class="banner"> |
|
|
|
<video class="video" ref="video" autoplay muted loop> |
|
|
|
<video class="video" ref="video" autoplay muted loop> |
|
|
@ -7,7 +7,7 @@ |
|
|
|
您的浏览器不支持 video 标签。 |
|
|
|
您的浏览器不支持 video 标签。 |
|
|
|
</video> |
|
|
|
</video> |
|
|
|
<div class="banner-inner"> |
|
|
|
<div class="banner-inner"> |
|
|
|
<div class="banner-title" v-if="!keyword">准确,多元,海量数据</div> |
|
|
|
<div class="banner-title">准确,多元,海量数据</div> |
|
|
|
<div class="search-wrap"> |
|
|
|
<div class="search-wrap"> |
|
|
|
<div class="search"> |
|
|
|
<div class="search"> |
|
|
|
<input ref="keyword" v-model="keyword" type="text" placeholder="请输入关键词"> |
|
|
|
<input ref="keyword" v-model="keyword" type="text" placeholder="请输入关键词"> |
|
|
@ -25,7 +25,7 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="list-wrap" v-if="keyword"> |
|
|
|
<div class="list-wrap" v-if="keyword"> |
|
|
|
<div class="tips"> |
|
|
|
<div class="tips"> |
|
|
|
<p class="result"><img src="@/assets/img/index/search.png" alt=""> 搜索结果</p> |
|
|
|
<p class="result-title"><img src="@/assets/img/index/search.png" alt=""> 搜索结果</p> |
|
|
|
<p class="num">搜索完成,共有{{total}}个结果匹配</p> |
|
|
|
<p class="num">搜索完成,共有{{total}}个结果匹配</p> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
|
@ -381,15 +381,13 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 获取热门下载数据 |
|
|
|
// 获取热门下载数据 |
|
|
|
getHot(){ |
|
|
|
getHot(){ |
|
|
|
this.$get(this.api.queryDatabaseInfo).then(res => { |
|
|
|
this.$get(this.api.queryDatabaseInfo).then(({ data }) => { |
|
|
|
let list = res.data |
|
|
|
|
|
|
|
list.map(n => n.download) |
|
|
|
|
|
|
|
// 根据下载量排序 |
|
|
|
// 根据下载量排序 |
|
|
|
list.sort((a,b) => { |
|
|
|
data.sort((a,b) => { |
|
|
|
return b.download - a.download |
|
|
|
return b.downloads - a.downloads |
|
|
|
}) |
|
|
|
}) |
|
|
|
// 只展示前三条 |
|
|
|
// 只展示前三条 |
|
|
|
this.hotData = list.slice(0,3) |
|
|
|
this.hotData = data.slice(0,3) |
|
|
|
}).catch(res => {}) |
|
|
|
}).catch(res => {}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
initData(){ |
|
|
|
initData(){ |
|
|
@ -410,7 +408,7 @@ export default { |
|
|
|
// 登录了才能查看数据,否则直接跳转到登录页 |
|
|
|
// 登录了才能查看数据,否则直接跳转到登录页 |
|
|
|
if(this.token){ |
|
|
|
if(this.token){ |
|
|
|
if (this.routes.find(e => e.path === '/data/list')) { |
|
|
|
if (this.routes.find(e => e.path === '/data/list')) { |
|
|
|
this.$router.push(`/data?typeId=${row.categoryTwoId}`) |
|
|
|
this.$router.push(`/data?typeId=${row.secondId}`) |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
this.keyword = row.categoryTwo |
|
|
|
this.keyword = row.categoryTwo |
|
|
|
} |
|
|
|
} |
|
|
@ -702,12 +700,11 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
&.result{ |
|
|
|
&.result{ |
|
|
|
.banner{ |
|
|
|
|
|
|
|
padding: 46px 0; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.tips{ |
|
|
|
.tips{ |
|
|
|
margin-bottom: 22px; |
|
|
|
margin-bottom: 22px; |
|
|
|
.result{ |
|
|
|
.result-title{ |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
align-items: center; |
|
|
|
margin: 30px 0 10px; |
|
|
|
margin: 30px 0 10px; |
|
|
|
font-size: 17px; |
|
|
|
font-size: 17px; |
|
|
|
color: $main-color; |
|
|
|
color: $main-color; |
|
|
|