From eceab89f614600dcb042f1c497a8bc2761382e9a Mon Sep 17 00:00:00 2001 From: Lj <1095098147@qq.com> Date: Tue, 8 Jul 2025 16:11:43 +0800 Subject: [PATCH] =?UTF-8?q?=E2=80=98=E6=96=B0=E5=A2=9E=E6=8E=A8=E5=B9=BF?= =?UTF-8?q?=E4=BA=BA=E6=95=B0=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/model/index.js | 5 +++++ pages/subcomponent/promotion.vue | 31 +++++++++++++++++++++++++------ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/api/model/index.js b/api/model/index.js index 4de7275..d8d0e5d 100644 --- a/api/model/index.js +++ b/api/model/index.js @@ -248,6 +248,11 @@ const api = { method: 'GET', auth: true, }, + getPromotionCount: { + url: '/recycle-admin/applet/promotion/getPromotionCount', + method: 'GET', + auth: true, + }, } diff --git a/pages/subcomponent/promotion.vue b/pages/subcomponent/promotion.vue index 301fe62..cbd7c25 100644 --- a/pages/subcomponent/promotion.vue +++ b/pages/subcomponent/promotion.vue @@ -34,7 +34,10 @@ {{userInfo.name}} ID: {{userInfo.intentioCode}} - 推广人数 + + 推广人数 + {{ promotionCount }} + @@ -179,6 +182,7 @@ export default { balance: '', totalWithdraw: '', }, + promotionCount: 0, // 新增推广人数 tabActive: 0, rankList: [ ], @@ -222,6 +226,7 @@ export default { this.getUserInfoByToken() this.getRankList() this.getMyPromotionInfo() + this.getPromotionCount() // 新增 }, onShow(){ this.getMyPromotionInfo() @@ -296,6 +301,15 @@ export default { } }) }, + getPromotionCount() { + this.$api && this.$api('getPromotionCount', {}, res => { + if (res && res.code === 200 && res.result && typeof res.result.result === 'number') { + this.promotionCount = res.result.result + } else { + this.promotionCount = 0 + } + }) + }, goToFaq() { uni.navigateTo({ url: '/pages/subcomponent/admin_faq' }) }, @@ -515,13 +529,18 @@ export default { } } .user-count { - font-size: 30rpx; + display: flex; + flex-direction: column; + align-items: center; + font-size: 28rpx; color: #222; font-weight: bold; - text-align: right; - min-width: 120rpx; - margin-left: 16rpx; - align-self: center; + .user-count-value { + font-size: 36rpx; + color: #13ac47; + margin-top: 4rpx; + font-weight: bold; + } } } .user-stats-row {