feat: 优化
This commit is contained in:
@@ -63,7 +63,7 @@
|
||||
下单送{{ orderInfo.contribution }}贡献值
|
||||
</view>
|
||||
<!-- 销量还需要改 -->
|
||||
<view>销量{{ limit999(orderInfo.sales) }}件</view>
|
||||
<view>全网销量{{ limit999(orderInfo.sales) }}件</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
@@ -497,7 +497,11 @@ export default {
|
||||
methods: {
|
||||
assembleAddress,
|
||||
limit999(n) {
|
||||
return n > 999 ? '999+' : String(n);
|
||||
const num = Number(n);
|
||||
if (isNaN(num) || num < 10000) {
|
||||
return n != null && n !== '' ? String(n) : '0';
|
||||
}
|
||||
return `${Math.floor(num / 10000)}万+`;
|
||||
},
|
||||
|
||||
onOpenApp() {
|
||||
|
||||
Reference in New Issue
Block a user