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 {