This commit is contained in:
2025-11-26 16:56:56 +08:00
parent 08ab9bf017
commit deab83fc81
10 changed files with 1215 additions and 746 deletions

View File

@@ -1846,12 +1846,13 @@ export default {
},
// 算平均分
avegeCount(arry) {
var ratedLength = arry.map(item => item.rated).filter(rated => rated&&rated>0).length;
let str = 0;
let all = 0;
for (let i = 0; i < arry.length; i++) {
all += Number(arry[i].rated);
}
str = (all / arry.length).toFixed(1);
str = (all / ratedLength).toFixed(1);
return str;
},