diff --git a/redPackets.html b/redPackets.html index ddaf48c..94d34e0 100644 --- a/redPackets.html +++ b/redPackets.html @@ -231,19 +231,22 @@ /* 动态font */ fonts () { const { cash_amount_type, min_denomination, max_denomination } = this.goodsInfo.entity; + const defaultCss = { + b: '0.2rem', + a: '0.32rem' + }; if (cash_amount_type === '2') { const count = String(parseFloat(min_denomination)).length + String(parseFloat(max_denomination)).length + 1; - if (count > 6) { return { a: 0.32 - ((count - 6) / 100 * 1.5) + 'rem', b: 0.2 - ((count - 6) / 100) + 'rem' }; } else { - return { - b: '0.2rem' - }; + return defaultCss; } + } else { + return defaultCss; } } },