diff --git a/src/views/portal/case/Index.vue b/src/views/portal/case/Index.vue index f9c1eabf..957afcd6 100644 --- a/src/views/portal/case/Index.vue +++ b/src/views/portal/case/Index.vue @@ -144,27 +144,92 @@
-
- -
- 排行榜 -
-
- - +
+
+ +
+ 好评榜 +
+
+ + + + + + - - {{item.sysCreateUname}} - - -
-
+ {{index+1}} + + + {{ item.sysCreateUname }} + + + +
+ +
+ +
+ 人气榜 +
+
+ + + + + + + + + + {{index+1}} + + + {{ item.title }} + + + +
+
+
+ +
+ 人气榜 +
+
+ + + + + + + + + + {{index+1}} + + + {{ item.title }} + + + +
+
+ + +
+ +
+ + + +
+
@@ -198,6 +263,7 @@ import author from '@/components/Portal/authorInfo.vue'; import apiCase from '@/api/modules/cases.js'; import apiUser from '@/api/system/user.js'; import apiSearchterm from "@/api/modules/searchterm.js"; +import apiDict from "@/api/modules/dict.js"; export default { name: 'index', components: { portalHeader, portalFooter, portalFloatTools, interactBar,timeShow ,author}, @@ -219,6 +285,8 @@ export default { list:[] }, ankingList:[], + Popularity:[], + Positive:[], protocolDialogVisible: false, protocolConfirmButton:true, queryCondition:{ @@ -244,7 +312,9 @@ export default { } this.keyWord = this.$route.query.keyword; this.getAnkingData() + this.getPopularity() this.searchterm() + this.getPositive() this.getCaseData(); window.addEventListener( "scroll", @@ -377,17 +447,78 @@ export default { }); }, getAnkingData(){ - apiCase.usernameList(10).then(res=>{ + apiCase.usernameList(5).then(res=>{ if(res.status==200){ this.ankingList=res.result + // console.log(res) } }) + }, + getPopularity(){ + apiCase.queryPraises(5).then(res=>{ + if(res.status==200){ + this.Popularity=res.result + // console.log(this.Popularity) + } + }) + }, + getPositive(){ + apiCase.queryComments(5).then(res=>{ + if(res.status==200){ + this.Positive=res.result + console.log(res) + } + }) + }, + + jumpRouter(item){ + this.$router.push(`/case/detail?id=${item.id}`); + } + + } }; - + + + + + + diff --git a/src/views/study/PortalIndex.vue b/src/views/study/PortalIndex.vue index b5459e7b..b4b702e4 100644 --- a/src/views/study/PortalIndex.vue +++ b/src/views/study/PortalIndex.vue @@ -1,1440 +1,1451 @@ - - - - - + + + + +