diff --git a/src/api/modules/cases.js b/src/api/modules/cases.js
index 88c02e73..ba64b45f 100644
--- a/src/api/modules/cases.js
+++ b/src/api/modules/cases.js
@@ -88,6 +88,12 @@ const usernameList = function (pageSize) {
const queryPraises = function (pageSize) {
return ajax.get(`/xboe/m/boe/cases/query-praises?pageSize=${pageSize}`);
}
+const queryPraisesNew = function (pageSize,rankType) {
+ return ajax.get(`/xboe/m/boe/cases/queryPopularity?pageSize=${pageSize}&rankType=${rankType}`);
+}
+const queryRecommendRank = function (pageSize) {
+ return ajax.get(`/xboe/m/boe/cases/queryRecommendRank?pageSize=${pageSize}`);
+}
/*
好评榜
@param pageSize 长度
@@ -95,6 +101,9 @@ const queryPraises = function (pageSize) {
const queryComments = function (pageSize) {
return ajax.get(`/xboe/m/boe/cases/query-comments?pageSize=${pageSize}`);
}
+const queryCommentsNew = function (pageSize,rankType) {
+ return ajax.get(`/xboe/m/boe/cases/queryHighOpinion?pageSize=${pageSize}&rankType=${rankType}`);
+}
/**
* 专业分类
@@ -202,7 +211,10 @@ export default {
query,
usernameList,
queryPraises,
+ queryPraisesNew,
+ queryRecommendRank,
queryComments,
+ queryCommentsNew,
majorTypes,
details,
ids,
diff --git a/src/views/portal/case/Charts.vue b/src/views/portal/case/Charts.vue
index a2c6162c..49c59005 100644
--- a/src/views/portal/case/Charts.vue
+++ b/src/views/portal/case/Charts.vue
@@ -23,11 +23,11 @@
-
-
+
- {{ item.title }}
+ {{ item.caseTitle }}
@@ -47,11 +47,11 @@
-
-
+
- {{ item.title }}
+ {{ item.caseTitle }}
@@ -61,12 +61,12 @@
推荐榜
- -
-
+
-
+
- {{ item.title }}
+ {{ item.caseTitle }}
@@ -87,6 +87,7 @@ import portalHeader from '@/components/PortalHeader.vue'
ankingList: [],//排行数据1
Popularity: [],//排行数据2
Positive: [],//排行数据3
+ recommendRank: [],
switch: {
'total': '总',
'quarter': '季度',
@@ -98,21 +99,29 @@ import portalHeader from '@/components/PortalHeader.vue'
mounted() {
this.getPopularity();
this.getPositive();
+ this.getQueryRecommendRank()
},
methods: {
getPopularity() {
- apiCase.queryPraises(5).then(res => {
- if (res.status == 200) {
- this.Popularity = [...res.result,...res.result];
+ apiCase.queryPraisesNew(10,this.popularityName == '季度' ? 1 : 2).then(res => {
+ if(res.status == 200) {
+ this.Popularity = res.result
}
- });
+ })
},
getPositive() {
- apiCase.queryComments(5).then(res => {
- if (res.status == 200) {
- this.Positive = [...res.result,...res.result];
+ apiCase.queryCommentsNew(10,this.favorableName == '季度' ? 1 : 2).then(res => {
+ if(res.status == 200) {
+ this.Positive = res.result
}
- });
+ })
+ },
+ getQueryRecommendRank(){
+ apiCase.queryRecommendRank(10).then(res => {
+ if(res.status == 200) {
+ this.recommendRank = res.result
+ }
+ })
},
imgNumBlue(index){
return 'listblue0' + (index+1)
@@ -129,9 +138,11 @@ import portalHeader from '@/components/PortalHeader.vue'
},
positiveReview(e){
this.favorableName = this.switch[e]
+ this.getPositive()
},
popularityReview(e){
this.popularityName = this.switch[e]
+ this.getPopularity()
},
},
}
diff --git a/src/views/portal/case/Index.vue b/src/views/portal/case/Index.vue
index e6625b04..912b6bc1 100644
--- a/src/views/portal/case/Index.vue
+++ b/src/views/portal/case/Index.vue
@@ -304,7 +304,7 @@
-
-
+
@@ -320,7 +320,7 @@
-->
- {{ item.title }}
+ {{ item.caseTitle }}
@@ -341,7 +341,7 @@
-
-
+
@@ -357,7 +357,7 @@
- {{ item.title }}
+ {{ item.caseTitle }}
@@ -365,9 +365,9 @@
推荐榜
- -
-
+
@@ -377,7 +377,7 @@
- {{ item.title }}
+ {{ item.caseTitle }}
@@ -514,6 +514,7 @@ export default {
ankingList: [],//排行数据1
Popularity: [],//排行数据2
Positive: [],//排行数据3
+ recommendRank: [],
protocolDialogVisible: false,
protocolConfirmButton: true,
years: [],
@@ -811,6 +812,7 @@ export default {
//打开排行榜下边的两个
this.getPopularity();
this.getPositive();
+ this.getQueryRecommendRank()
this.couresreso();
// window.addEventListener("scroll", this.handleScroll);
// 获取年
@@ -824,9 +826,11 @@ export default {
methods: {
positiveReview(e){
this.favorableName = this.switch[e]
+ this.getPositive()
},
popularityReview(e){
this.popularityName = this.switch[e]
+ this.getPopularity()
},
handleType(msg){
this.queryCondition.type = msg
@@ -1584,40 +1588,58 @@ export default {
});
},
getPopularity() {
- apiCase.queryPraises(5).then(res => {
- if (res.status == 200) {
- this.Popularity = res.result.slice(0,3);
- // if (res.result.length < 5) {
- // for (let i = 0; i = (5 - res.result.length); i++) {
- // this.Popularity.push({
- // authorName: '',
- // count: 1,
- // id: '',
- // title: '',
- // })
- // }
- // }
+ // apiCase.queryPraises(5).then(res => {
+ // if (res.status == 200) {
+ // this.Popularity = res.result.slice(0,3);
+ // // if (res.result.length < 5) {
+ // // for (let i = 0; i = (5 - res.result.length); i++) {
+ // // this.Popularity.push({
+ // // authorName: '',
+ // // count: 1,
+ // // id: '',
+ // // title: '',
+ // // })
+ // // }
+ // // }
+ // }
+ // });
+ apiCase.queryPraisesNew(3,this.popularityName == '季度' ? 1 : 2).then(res => {
+ if(res.status == 200) {
+ this.Popularity = res.result
}
- });
+ })
},
getPositive() {
- apiCase.queryComments(5).then(res => {
- if (res.status == 200) {
- this.Positive = res.result.slice(0,3);
- // if (res.result.length < 5) {
- // for (let i = 0; i = (5 - res.result.length); i++) {
- // this.Positive.push({
- // authorName: '',
- // count: 1,
- // id: '',
- // title: '',
- // })
- // }
+ // apiCase.queryComments(5).then(res => {
+ // if (res.status == 200) {
+ // this.Positive = res.result.slice(0,3);
+ // // if (res.result.length < 5) {
+ // // for (let i = 0; i = (5 - res.result.length); i++) {
+ // // this.Positive.push({
+ // // authorName: '',
+ // // count: 1,
+ // // id: '',
+ // // title: '',
+ // // })
+ // // }
- // }
+ // // }
+ // }
+ // });
+ apiCase.queryCommentsNew(3,this.favorableName == '季度' ? 1 : 2).then(res => {
+ if(res.status == 200) {
+ this.Positive = res.result
}
- });
+ })
+ },
+
+ getQueryRecommendRank(){
+ apiCase.queryRecommendRank(3).then(res => {
+ if(res.status == 200) {
+ this.recommendRank = res.result
+ }
+ })
},
jumpRouter(item) {