mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-11 03:46:47 +08:00
提交修改
This commit is contained in:
@@ -32,7 +32,7 @@ export function getCourseType(type) {
|
||||
21: '直播课',
|
||||
20: '录播课',
|
||||
30: '面授课',
|
||||
40: '混合式',
|
||||
40: '学习项目',
|
||||
};
|
||||
return maps[type];
|
||||
}
|
||||
@@ -238,3 +238,29 @@ export function getHMS(time) {
|
||||
const sec = parseInt(time % 3600 % 60) < 10 ? '0' + parseInt(time % 3600 % 60) : parseInt(time % 3600 % 60)
|
||||
return hour + ':' + min + ':' + sec
|
||||
}
|
||||
|
||||
/**格式化人数的文档 ,学习人数,关注人数等*/
|
||||
export function formatUserNumber(num) {
|
||||
let rsNum =0;
|
||||
if(num<5){return 0;}
|
||||
if(num>=5 && num<= 10){return 10 +"+";}
|
||||
if(num<=94){
|
||||
rsNum=Math.round((num)/10)*10;
|
||||
return rsNum+'+';
|
||||
}
|
||||
if(num>94 && num <= 1000){
|
||||
rsNum=Math.round((num)/100)*100;
|
||||
return rsNum+'+';
|
||||
}
|
||||
if(num>1000 && num <= 10000){
|
||||
rsNum=Math.round((num)/1000)*1000;
|
||||
return rsNum+'+';
|
||||
}
|
||||
if(num>10000){
|
||||
// rsNum=Math.round((num)/10000)*10000;
|
||||
// return rsNum+'+';
|
||||
rsNum=Math.round((num)/10000);
|
||||
return rsNum+'W+';
|
||||
}
|
||||
return num;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user