Browse Source

‘新增推广人数’

master
Lj 2 weeks ago
parent
commit
eceab89f61
2 changed files with 30 additions and 6 deletions
  1. +5
    -0
      api/model/index.js
  2. +25
    -6
      pages/subcomponent/promotion.vue

+ 5
- 0
api/model/index.js View File

@ -248,6 +248,11 @@ const api = {
method: 'GET',
auth: true,
},
getPromotionCount: {
url: '/recycle-admin/applet/promotion/getPromotionCount',
method: 'GET',
auth: true,
},
}


+ 25
- 6
pages/subcomponent/promotion.vue View File

@ -34,7 +34,10 @@
<view class="nickname">{{userInfo.name}}</view>
<view class="userid">ID: {{userInfo.intentioCode}}</view>
</view>
<view class="user-count">推广人数</view>
<view class="user-count">
推广人数
<view class="user-count-value">{{ promotionCount }}</view>
</view>
</view>
<view class="user-stats-row">
<view class="stat-block">
@ -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 {


Loading…
Cancel
Save