日常更新
This commit is contained in:
@@ -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;仅执行一次,不触发额外查询。
|
||||
|
||||
Reference in New Issue
Block a user