|
|
@@ -257,12 +257,14 @@ export default {
|
|
|
topApp(param.num,param.start,param.end).then((res) => {
|
|
|
let maxv = 100;
|
|
|
res.forEach((item,index) => {
|
|
|
- if(index === 0){
|
|
|
- maxv = item.count;
|
|
|
+ if(index < 5){
|
|
|
+ if(index === 0){
|
|
|
+ maxv = item.count;
|
|
|
+ }
|
|
|
+ item.percentage = (item.count/maxv*100).toFixed(1);
|
|
|
+ let str = { name: item.name.trim() == '' ? '其他' : item.name, count: item.count, percentage: item.percentage }
|
|
|
+ that.hotApps.push(str);
|
|
|
}
|
|
|
- item.percentage = (item.count/maxv*100).toFixed(1);
|
|
|
- let str = { name: item.name.trim() == '' ? '其他' : item.name, count: item.count, percentage: item.percentage }
|
|
|
- that.hotApps.push(str);
|
|
|
});
|
|
|
// console.log(that.hotApps);
|
|
|
});
|