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 {