|
@@ -41,19 +41,19 @@
|
|
|
<el-row>
|
|
|
<el-col :span="19" class="test-type-wrapper">
|
|
|
<TestMenu :testTypeList="homeData.testTypeList"></TestMenu>
|
|
|
- <TestCard :homeData="homeData"></TestCard>
|
|
|
+ <TestCard :applicationTypeList="homeData.applicationTypeList"></TestCard>
|
|
|
</el-col>
|
|
|
<el-col :span="5" class="homepage-right-modules">
|
|
|
<LoginCard/>
|
|
|
- <HotCrowd :applicationTypeRank="homeData.applicationTypeRank"/>
|
|
|
- <HotAgency :agencyRank="homeData.agencyRank"/>
|
|
|
- <HotUser :userRank="homeData.userRank"/>
|
|
|
+ <HotCrowd :applicationTypeRank="homeDataNoCache.applicationTypeRank"/>
|
|
|
+ <HotAgency :agencyRank="homeDataNoCache.agencyRank"/>
|
|
|
+ <HotUser :userRank="homeDataNoCache.userRank"/>
|
|
|
<HotContest :competitionList="homeData.competitionList"/>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row :gutter="15">
|
|
|
<el-col :span="12">
|
|
|
- <ResourceAndTool :resourceList="homeData.resourceList"></ResourceAndTool>
|
|
|
+ <ResourceAndTool :resourceList="homeDataNoCache.resourceList"></ResourceAndTool>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<BrandCard :residentAgencyList = homeData.residentAgencyList></BrandCard>
|
|
@@ -145,6 +145,7 @@
|
|
|
],
|
|
|
},
|
|
|
homeData:{},
|
|
|
+ homeDataNoCache: {},
|
|
|
currTab:'homepage'
|
|
|
}
|
|
|
},
|
|
@@ -155,12 +156,17 @@
|
|
|
}
|
|
|
this.setFields();
|
|
|
|
|
|
- Http.get('/api/common/index/info').then((res)=>{
|
|
|
+ Http.get('/api/common/index/info/cache').then((res)=>{
|
|
|
+ console.log(res.data);
|
|
|
this.homeData = res.data;
|
|
|
- this.homeData.applicationTypeList.map((item)=>{
|
|
|
- item.height = (item.testTypeList.length / 2) * 24 + 100;
|
|
|
- return item;
|
|
|
- })
|
|
|
+ // this.homeData.applicationTypeList.map((item)=>{
|
|
|
+ // item.height = (item.testTypeList.length / 2) * 24 + 100;
|
|
|
+ // return item;
|
|
|
+ // })
|
|
|
+ })
|
|
|
+
|
|
|
+ Http.get('/api/common/index/info/nocache').then((res)=>{
|
|
|
+ this.homeDataNoCache = res.data;
|
|
|
})
|
|
|
},
|
|
|
setFields(){
|
|
@@ -168,7 +174,6 @@
|
|
|
this.homeTabArr.menuArr2 = res
|
|
|
// console.log(this.homeTabArr.menuArr2)
|
|
|
})
|
|
|
-
|
|
|
},
|
|
|
checkLogin(){
|
|
|
if(!this.isLogin){
|
|
@@ -181,12 +186,19 @@
|
|
|
},
|
|
|
handleTabClick(tab){
|
|
|
this.currTab = tab.name;
|
|
|
- console.log(this.currTab + " " + tab.index );
|
|
|
+ // console.log(this.currTab + " " + tab.index + " " + tab.name );
|
|
|
for(let i = 0; i < this.homeTabArr.menuArr3.length; i++){
|
|
|
if (this.currTab === this.homeTabArr.menuArr3[i].name){
|
|
|
this.$router.push(this.homeTabArr.menuArr3[i].linkTo);
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ for(let i = 0; i < this.homeTabArr.menuArr2.length; i++){
|
|
|
+ if (this.currTab === this.homeTabArr.menuArr2[i].code){
|
|
|
+ this.$router.push('/field/detail');
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
this.$router.push(this.homeTabArr.menuArr1[Number(tab.index)].linkTo);
|
|
|
},
|
|
|
handleTypeClick(tab){
|