Commit e5c66a2e authored by 徐一鸣's avatar 徐一鸣

fixed bug#2665

parent 783ccf38
...@@ -478,31 +478,11 @@ export default { ...@@ -478,31 +478,11 @@ export default {
}, },
], // 服务状态统计 ], // 服务状态统计
starlistData: [ starlistData: [
{ { star: 5, count: 0, unit: "" },
star: 5, { star: 4, count: 0, unit: "" },
count: 0, { star: 3, count: 0, unit: "" },
unit: "", { star: 2, count: 0, unit: "" },
}, { star: 1, 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, starlistTotal: 0,
hotSearchHeader: [], // 热门搜索 表头 hotSearchHeader: [], // 热门搜索 表头
......
...@@ -497,8 +497,14 @@ export default { ...@@ -497,8 +497,14 @@ export default {
toplistTargetValue: 40, // 服务调用排名分析 目标值 toplistTargetValue: 40, // 服务调用排名分析 目标值
commentlistData: [], // 服务评价 commentlistData: [], // 服务评价
linelistData: [], // 服务状态统计 linelistData: [], // 服务状态统计
starlistData: [], // 服务评分 starlistData: [
starlistTotal: 15, { 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: [], // 热门搜索 表头 hotSearchHeader: [], // 热门搜索 表头
hotSearchData: [], // 热门搜索 数据 hotSearchData: [], // 热门搜索 数据
graph_arr: { graph_arr: {
...@@ -951,4 +957,4 @@ export default { ...@@ -951,4 +957,4 @@ export default {
word-break: break-all; word-break: break-all;
white-space: nowrap; white-space: nowrap;
} }
</style> </style>
\ No newline at end of file
...@@ -495,8 +495,14 @@ export default { ...@@ -495,8 +495,14 @@ export default {
toplistTargetValue: 40, // 服务调用排名分析 目标值 toplistTargetValue: 40, // 服务调用排名分析 目标值
commentlistData: [], // 服务评价 commentlistData: [], // 服务评价
linelistData: [], // 服务状态统计 linelistData: [], // 服务状态统计
starlistData: [], // 服务评分 starlistData: [
starlistTotal: 15, { 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: [], // 热门搜索 表头 hotSearchHeader: [], // 热门搜索 表头
hotSearchData: [], // 热门搜索 数据 hotSearchData: [], // 热门搜索 数据
graph_arr: { graph_arr: {
...@@ -715,26 +721,30 @@ export default { ...@@ -715,26 +721,30 @@ export default {
}) })
.then((response) => { .then((response) => {
if (response.data.success == 1) { if (response.data.success == 1) {
let _data = response.data.data;
if (this.right_3_state == 0) { if (this.right_3_state == 0) {
let data = response.data.data || []; _data = _data || [];
this.commentlistData = data.concat(this.commentlistData);
this.commentlistData = _data.concat(this.commentlistData);
if (this.commentlistData && this.commentlistData.length != 0) { if (this.commentlistData && this.commentlistData.length != 0) {
this.last_id = this.commentlistData[0].last_id; this.last_id = this.commentlistData[0].last_id;
} }
} else { } else {
let data = response.data.data; if (_data) {
this.starlistData[0].count = data.score5; this.starlistData[0].count = _data.score5;
this.starlistData[1].count = data.score4; this.starlistData[1].count = _data.score4;
this.starlistData[2].count = data.score3; this.starlistData[2].count = _data.score3;
this.starlistData[3].count = data.score2; this.starlistData[3].count = _data.score2;
this.starlistData[4].count = data.score1; this.starlistData[4].count = _data.score1;
this.starlistTotal = this.starlistTotal =
data.score5 + _data.score5 +
data.score4 + _data.score4 +
data.score3 + _data.score3 +
data.score2 + _data.score2 +
data.score1; _data.score1;
console.log(this.starlistData, this.starlistTotal); }
} }
} }
}); });
...@@ -957,4 +967,4 @@ export default { ...@@ -957,4 +967,4 @@ export default {
word-break: break-all; word-break: break-all;
white-space: nowrap; white-space: nowrap;
} }
</style> </style>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment