日常更新

This commit is contained in:
2025-11-20 14:28:57 +08:00
parent c7cee78798
commit a02c287715
9 changed files with 246 additions and 20 deletions

View File

@@ -3,7 +3,7 @@ import { getProductById } from '../../utils/productService'
import { addToCart } from '../../utils/cartManager'
import { getMachineInfo, getPayTypes } from '../../api/products'
import { addCart, getGoodsList } from '../../api/shoppingCart'
import { truncateAmountByCoin } from '../../utils/amount'
import { truncateAmountByCoin, truncateTo6 } from '../../utils/amount'
export default {
name: 'ProductDetail',
@@ -174,6 +174,10 @@ export default {
formatAmount(value, coin) {
return truncateAmountByCoin(value, coin)
},
// 数值格式化最多6位小数截断不补0
formatNum6(value) {
return truncateTo6(value)
},
/**
* 首次加载时,将“支付方式筛选”的默认选中值设为与价格列币种一致,
* 并同步 filters.chain/filters.coin仅执行一次不触发额外查询。