From 7041536a96495b35a8694332eddb4e48d0540616 Mon Sep 17 00:00:00 2001 From: pengda <1111@qq.com> Date: Mon, 11 Aug 2025 17:35:59 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E4=BD=99=E9=A2=9D=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/agent/home.vue | 87 ++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 77 insertions(+), 10 deletions(-) diff --git a/src/views/agent/home.vue b/src/views/agent/home.vue index 1072f63..68c70bb 100644 --- a/src/views/agent/home.vue +++ b/src/views/agent/home.vue @@ -83,10 +83,21 @@
-
+
+
账户余额
含冻结金额 {{ walletList.pub.forzen_money }} 元
-
- 账户余额  {{ walletList.pub.remain }} 元 +
+ + 账户余额  + + + {{ intPart }} + . + {{ decPart }} + + +  元 + {{ isShowSpec ? '收起' : '展开' }}
@@ -180,6 +191,7 @@ export default { expireServices: [], + walletWarp: false, walletList: [], noticeList: [], @@ -230,13 +242,48 @@ export default { GuipDialog, GuipTextarea, }, + computed: { + intPart() { + if(this.walletList && this.walletList.pub && this.walletList.pub.remain > 0){ + return String(this.walletList.pub.remain).split('.')[0] + } + return "" + }, + decPart() { + if(this.walletList && this.walletList.pub && this.walletList.pub.remain > 0){ + return String(this.walletList.pub.remain).split('.')[1] || '' + } + return "" + } + }, mounted() { + const el = this.$refs.balanceBox + if (el) { + this.resizeObserver = new ResizeObserver(entries => { + requestAnimationFrame(() => { + for (let entry of entries) { + const width = parseInt(entry.contentRect.width) + if (width <= 258 && !this.walletWarp) { + this.walletWarp = true + } else if (width > 258 && this.walletWarp) { + this.walletWarp = false + } + } + }) + }) + this.resizeObserver.observe(el) + } this.getSupplyServiceList() this.getSaleStats() this.getExpireServices() this.getWalletList() this.getNoticeList() }, + beforeDestroy() { + if (this.resizeObserver) { + this.resizeObserver.disconnect() + } + }, methods: { getSupplyServiceList() { this.tableLoading = true @@ -686,13 +733,33 @@ a { align-items: baseline; background: #fff; - b { - font-family: Roboto Condensed; - font-size: 32px; - font-weight: bold; - line-height: 27px; - letter-spacing: normal; - color: #1F2026; + .flex-baseline{ + gap: 12px; + align-items: baseline; + white-space: nowrap; + } + + .priceDesc{ + display: flex; + flex-wrap: nowrap; + justify-content: flex-start; + align-items: baseline; + .price{ + font-family: Roboto Condensed; + font-weight: bold; + line-height: 27px; + letter-spacing: normal; + color: #1F2026; + .integer{ + font-size: 32px; + } + .dot{ + font-size: 16px; + } + .decimal{ + font-size: 16px; + } + } } span {