|
|
@@ -1,15 +1,26 @@
|
|
|
<template>
|
|
|
<div class="home-wrapper">
|
|
|
- <SearchBar :tabArr="tabArr" :menuArr="menuArr"></SearchBar>
|
|
|
+ <SearchBar :tabArr="tabArr" :menuArr="menuArr" :activeTab="activeTab"></SearchBar>
|
|
|
<div class="home-page container">
|
|
|
<el-row>
|
|
|
<el-col :span="19" class="test-type-wrapper">
|
|
|
- <TestMenu></TestMenu>
|
|
|
- <TestCard></TestCard>
|
|
|
+ <TestMenu :testTypeList="homeData.testTypeList"></TestMenu>
|
|
|
+ <TestCard :applicationTypeList="homeData.applicationTypeList"></TestCard>
|
|
|
</el-col>
|
|
|
<el-col :span="5" class="homepage-right-modules">
|
|
|
<LoginCard/>
|
|
|
-<!-- <PopularProject />-->
|
|
|
+ <HotCrowd :applicationTypeRank="homeData.applicationTypeRank"/>
|
|
|
+ <HotAgency :agencyRank="homeData.agencyRank"/>
|
|
|
+ <HotUser :userRank="homeData.userRank"/>
|
|
|
+ <HotContest :competitionList="homeData.competitionList"/>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ <el-row :gutter="15">
|
|
|
+ <el-col :span="12">
|
|
|
+ <ResourceAndTool :resourceList="homeData.resourceList"></ResourceAndTool>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <BrandCard :residentAgencyList = homeData.residentAgencyList></BrandCard>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<InstitutionCard></InstitutionCard>
|
|
|
@@ -21,23 +32,38 @@
|
|
|
import SearchBar from '../../components/commons/SearchBar'
|
|
|
import TestMenu from './TestMenu'
|
|
|
import LoginCard from './LoginCard'
|
|
|
+ import BrandCard from './BrandCard'
|
|
|
+ import ResourceAndTool from './ResourceAndTool'
|
|
|
import TestCard from './TestCard'
|
|
|
import InstitutionCard from './InstitutionCard'
|
|
|
- import PopularProject from '../Square/PopularProjext'
|
|
|
+ import HotCrowd from './HotCrowd'
|
|
|
+ import HotAgency from './HotAgency'
|
|
|
+ import HotUser from './HotUser'
|
|
|
+ import HotContest from './HotContest'
|
|
|
+ import PopularProject from '../Square/PopularProject'
|
|
|
+ import Http from '@/js/http.js'
|
|
|
|
|
|
export default {
|
|
|
name: 'Homepage',
|
|
|
components: {
|
|
|
+ HotCrowd,
|
|
|
+ HotContest,
|
|
|
+ HotUser,
|
|
|
+ HotAgency,
|
|
|
InstitutionCard,
|
|
|
SearchBar,
|
|
|
TestMenu,
|
|
|
PopularProject,
|
|
|
LoginCard,
|
|
|
- TestCard
|
|
|
+ TestCard,
|
|
|
+ BrandCard,
|
|
|
+ ResourceAndTool
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ activeTab:'homepage',
|
|
|
tabArr: [
|
|
|
+ {label: "项目", name: "project"},
|
|
|
{label: "工具", name: "tool"},
|
|
|
{label: "机构", name: "institution"},
|
|
|
{label: "专家", name: "expert"}
|
|
|
@@ -57,9 +83,20 @@
|
|
|
{label: "找机构", name: "findInstitution"},
|
|
|
{label: "找专家", name: "finfExpert"},
|
|
|
// {label: "更多", name: "findMore"},
|
|
|
- ]
|
|
|
+ ],
|
|
|
+ homeData:{}
|
|
|
}
|
|
|
},
|
|
|
+ methods:{
|
|
|
+ loadData(){
|
|
|
+ Http.get('/api/common/index/info').then((res)=>{
|
|
|
+ this.homeData = res.data;
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.loadData();
|
|
|
+ }
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
@@ -77,10 +114,10 @@
|
|
|
}
|
|
|
.test-type-wrapper {
|
|
|
padding-right: 15px;
|
|
|
+ margin-bottom: 15px;
|
|
|
}
|
|
|
.homepage-right-modules {
|
|
|
- margin-top: 15px;
|
|
|
- .el-card__body {
|
|
|
+ .login-card .el-card__body {
|
|
|
padding: 10px !important;
|
|
|
}
|
|
|
}
|