小于5显示数字,不显示0

This commit is contained in:
daihh
2022-12-01 15:28:35 +08:00
parent 2a54fab649
commit 5edfe6c3cb

View File

@@ -410,7 +410,7 @@ export function translate(field) {
/**格式化人数的文档 ,学习人数,关注人数等*/
export function formatUserNumber(num) {
let rsNum =0;
if(num<5){return 0;}
if(num<5){return num;}
if(num>=5 && num<= 10){return 10 +"+";}
if(num<=94){
rsNum=Math.round((num)/10)*10;