From 2fcd8c7c89753abd856ecc5e92297cdb7230ad26 Mon Sep 17 00:00:00 2001 From: wangsongsole Date: Thu, 29 Jun 2023 16:51:20 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=8A=20fix:=20=E5=8A=A8=E6=80=81?= =?UTF-8?q?=E9=87=91=E9=A2=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- homepage2_0.css | 3 +-- redPackets.html | 23 +++++++++++++++++++++-- 2 files changed, 22 insertions(+), 4 deletions(-) diff --git a/homepage2_0.css b/homepage2_0.css index e062390..148b2a2 100644 --- a/homepage2_0.css +++ b/homepage2_0.css @@ -1272,8 +1272,7 @@ ul { } #redPacketsViews .tag { - font-size: 0.2rem; - margin-right: -0.05rem; + margin-right: -0.08rem; display: inline; } #redPacketsViews .instruction-text { diff --git a/redPackets.html b/redPackets.html index f179dce..3197c3e 100644 --- a/redPackets.html +++ b/redPackets.html @@ -54,8 +54,9 @@ 红包有限期截止 {{goodsInfo.entity.end_time}}

- - {{goodsInfo.entity.cash_amount_type==='1'?parseFloat(goodsInfo.entity.denomination) + + {{goodsInfo.entity.cash_amount_type==='1'?parseFloat(goodsInfo.entity.denomination) :`${parseFloat(goodsInfo.entity.min_denomination)}~${parseFloat(goodsInfo.entity.max_denomination)}`}}

@@ -226,6 +227,24 @@ history.go(-2); } }, + + /* 动态font */ + fonts () { + const { cash_amount_type, min_denomination, max_denomination } = this.goodsInfo.entity; + 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' + }; + } + return { + b: '0.2rem ' + }; + } + } }, })