diff --git a/src/pages/data-analysis/my-service.vue b/src/pages/data-analysis/my-service.vue index 5c82d4122f0b442a75852ef00ffefa7ac5f3a688..18d03794838c044d85f619503af80bf232c91d9c 100644 --- a/src/pages/data-analysis/my-service.vue +++ b/src/pages/data-analysis/my-service.vue @@ -478,31 +478,11 @@ export default { }, ], // 服务状态统计 starlistData: [ - { - star: 5, - count: 0, - unit: "个", - }, - { - star: 4, - count: 0, - unit: "个", - }, - { - star: 3, - count: 0, - unit: "个", - }, - { - star: 2, - count: 0, - unit: "个", - }, - { - star: 1, - count: 0, - unit: "个", - }, + { star: 5, count: 0, unit: "个" }, + { star: 4, count: 0, unit: "个" }, + { star: 3, count: 0, unit: "个" }, + { star: 2, count: 0, unit: "个" }, + { star: 1, count: 0, unit: "个" }, ], // 服务评分 starlistTotal: 0, hotSearchHeader: [], // 热门搜索 表头 diff --git a/src/pages/data-analysis/org-service.vue b/src/pages/data-analysis/org-service.vue index 700241b184690bfeade5166fbd7bd6dcac70f0f9..2788a80b1950aa5de3c011d1e2bc5acce49036a4 100644 --- a/src/pages/data-analysis/org-service.vue +++ b/src/pages/data-analysis/org-service.vue @@ -497,8 +497,14 @@ export default { toplistTargetValue: 40, // 服务调用排名分析 目标值 commentlistData: [], // 服务评价 linelistData: [], // 服务状态统计 - starlistData: [], // 服务评分 - starlistTotal: 15, + starlistData: [ + { star: 5, count: 0, unit: "个" }, + { star: 4, count: 0, unit: "个" }, + { star: 3, count: 0, unit: "个" }, + { star: 2, count: 0, unit: "个" }, + { star: 1, count: 0, unit: "个" }, + ], // 服务评分 + starlistTotal: 0, hotSearchHeader: [], // 热门搜索 表头 hotSearchData: [], // 热门搜索 数据 graph_arr: { @@ -951,4 +957,4 @@ export default { word-break: break-all; white-space: nowrap; } - \ No newline at end of file + diff --git a/src/pages/data-analysis/super-service.vue b/src/pages/data-analysis/super-service.vue index 0fa8659b940859b8ad0c0898ce9bd2595a1acd5c..221ac3c6502ad5adfedb02eb619596f054eb9613 100644 --- a/src/pages/data-analysis/super-service.vue +++ b/src/pages/data-analysis/super-service.vue @@ -495,8 +495,14 @@ export default { toplistTargetValue: 40, // 服务调用排名分析 目标值 commentlistData: [], // 服务评价 linelistData: [], // 服务状态统计 - starlistData: [], // 服务评分 - starlistTotal: 15, + starlistData: [ + { star: 5, count: 0, unit: "个" }, + { star: 4, count: 0, unit: "个" }, + { star: 3, count: 0, unit: "个" }, + { star: 2, count: 0, unit: "个" }, + { star: 1, count: 0, unit: "个" }, + ], // 评分 + starlistTotal: 10, hotSearchHeader: [], // 热门搜索 表头 hotSearchData: [], // 热门搜索 数据 graph_arr: { @@ -715,26 +721,30 @@ export default { }) .then((response) => { if (response.data.success == 1) { + let _data = response.data.data; + if (this.right_3_state == 0) { - let data = response.data.data || []; - this.commentlistData = data.concat(this.commentlistData); + _data = _data || []; + + this.commentlistData = _data.concat(this.commentlistData); + if (this.commentlistData && this.commentlistData.length != 0) { this.last_id = this.commentlistData[0].last_id; } } else { - let data = response.data.data; - this.starlistData[0].count = data.score5; - this.starlistData[1].count = data.score4; - this.starlistData[2].count = data.score3; - this.starlistData[3].count = data.score2; - this.starlistData[4].count = data.score1; - this.starlistTotal = - data.score5 + - data.score4 + - data.score3 + - data.score2 + - data.score1; - console.log(this.starlistData, this.starlistTotal); + if (_data) { + this.starlistData[0].count = _data.score5; + this.starlistData[1].count = _data.score4; + this.starlistData[2].count = _data.score3; + this.starlistData[3].count = _data.score2; + this.starlistData[4].count = _data.score1; + this.starlistTotal = + _data.score5 + + _data.score4 + + _data.score3 + + _data.score2 + + _data.score1; + } } } }); @@ -957,4 +967,4 @@ export default { word-break: break-all; white-space: nowrap; } - \ No newline at end of file +