二手车交易,全部接口对接

This commit is contained in:
2025-03-12 09:32:57 +08:00
parent 76c6d6ef5b
commit 5371e43b53
9 changed files with 380 additions and 188 deletions

View File

@ -77,6 +77,15 @@ export const myMixins = {
} else {
// 这里是重复点击的判断
}
},
formatNumber(num) {
if (num < 10000) {
// 小于 5 位数,显示为 0.x 万
return `${(num / 10000).toFixed(1)}`;
} else {
// 大于或等于 5 位数,显示为 x 万,四舍五入到小数点后一位
return `${Math.round(num / 1000) / 10}`;
}
}
}
}