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

fixed bug#2665

parent 783ccf38
......@@ -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: [], // 热门搜索 表头
......
......@@ -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;
}
</style>
\ No newline at end of file
</style>
......@@ -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;
}
</style>
\ No newline at end of file
</style>
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