订阅功能

This commit is contained in:
13405411873 2025-04-03 16:07:23 +08:00
parent a3d56991da
commit f8a6995d96

View File

@ -11,14 +11,16 @@
<view class="dl-person-box">
<view class="user-image-box">
<view class="dl-image-box">
<image class="touxiang" src="@/static/images/profile.jpg" mode="aspectFit"></image>
<image v-if="!userInfo.avatar" class="touxiang" src="@/static/images/profile.jpg" mode="aspectFit">
</image>
<image v-else class="touxiang" :src="userInfo.avatar" mode="aspectFit"></image>
<image class="sex" src="@/static/mine/sex_girl.png" mode="aspectFit"></image>
</view>
<view class="name-box">
<text style="margin-bottom: 10rpx;">李林</text>
<text style="margin-bottom: 10rpx;">{{userInfo.nickName||''}}</text>
<view class="fans-box">
<image src="@/static/mine/fans.png" mode="aspectFit"></image>
<view class="fans-num">1000</view>
<view class="fans-num">{{userInfo.tfansNum||'0'}}</view>
</view>
</view>
<view class="edit-box">
@ -40,17 +42,17 @@
<view class="points-box">
<view class="item-box">
<view class="item-text-box">
<view>积分<text class="red-text">140</text></view>
<view>积分<text class="red-text">{{userInfo.pointsBalance||'0'}}</text></view>
<view class="dl-little">赚积分<uni-icons type="right" size="10">{{item.unicode}}</uni-icons></view>
</view>
<image src="@/static/mine/jifen.png" mode="aspectFit"></image>
<image src="@/static/index/zuanshi.png" mode="aspectFit"></image>
</view>
<view class="item-box">
<view class="item-text-box">
<view>报名<text class="red-text">140</text></view>
<view>报名<text class="red-text">{{userInfo.report||'0'}}</text></view>
<view class="dl-little">去提额<uni-icons type="right" size="10">{{item.unicode}}</uni-icons></view>
</view>
<image src="@/static/mine/baoming.png" mode="aspectFit"></image>
<image src="@/static/index/zuanshi.png" mode="aspectFit"></image>
</view>
</view>
</view>
@ -132,7 +134,12 @@
formatNumberWithUnits,
calculateTimeDifference
} from '@/utils/common.js'
import {
getJSONData
} from '@/utils/auth.js'
import {
bloggerDetail
} from '@/api/member/member.js'
export default {
components: {
tabBarVue,
@ -141,17 +148,31 @@
return {
//
nowUserType: null,
userInfo: {}
}
},
onLoad() {
nowUserType = getUserType()
},
mounted() {
if (null != getJSONData(constant.userInfo)) {
this.userInfo = getJSONData(constant.userInfo)
this.getBloggerDetail()
}
},
computed: {
windowHeight() {
return uni.getSystemInfoSync().windowHeight - 50
}
},
methods: {
getBloggerDetail() {
bloggerDetail(this.userInfo.userId).then(res => {
this.userInfo.tfansNum = res.data.tfansNum.toString()
this.userInfo.pointsBalance = res.data.pointsBalance.toString()
this.userInfo.report = res.data.report.toString()
})
},
/**
* 切换用户身份
*/