You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
2.4 KiB

<template>
<view class="index-page">
<view class="data-panel-box acea-row row-between">
<view>
<view>今日新增</view>
<view class="fz40">{{teamInfo.todayNum}}</view>
</view>
<view>
<view>一级</view>
<view class="fz40">{{teamInfo.firstNum}}</view>
</view>
<view>
<view>二级</view>
<view class="fz40">{{teamInfo.secondNum}}</view>
</view>
</view>
<view class="t-header acea-row row-middle row-between">
<view class="h-item">成员名称</view>
<view class="h-item w180">一级积分收益</view>
<view class="h-item w180">二级积分收益</view>
</view>
<view class="t-body">
<view class="b-item acea-row row-middle row-between" v-for="(item,index) in teamInfo.teamList" wx:key="index">
<view class="name">{{item.name}}</view>
<view class="name w180">{{item.firstNum}}积分</view>
<view class="name w180">{{item.secondNum}}积分</view>
</view>
</view>
<view class="loading-status">{{loadingStatus}}</view>
</view>
</template>
<script>
import { getMyTeam } from '@/api/user.js'
import cookie from '@/utils/store/cookie'
export default {
data() {
return {
userInfo: {},
teamInfo: {},
loadingStatus: '没有更多了。。。'
}
},
mounted() {
this.userInfo = cookie.get('userInfo')
this.getTeam()
},
onPullDownRefresh: function () {
this.getTeam()
},
methods: {
getTeam(){
getMyTeam().then((res)=>{
this.teamInfo = res.data
console.log(this.teamInfo)
uni.stopPullDownRefresh()
})
},
}
}
</script>
<style>
.index-page{
width: 100%;
min-height: 100vh;
background: #F8F8F8;
padding: 32rpx 38rpx;
}
.data-panel-box{
width: 100%;
padding: 38rpx 66rpx;
background: #FFD092;
border-radius: 24rpx;
color: #fff;
}
.data-panel-box view{
text-align: center;
}
.fz40{
font-size: 40rpx;
line-height: 56rpx;
}
.t-header{
width: 100%;
height: 48rpx;
border-radius: 16rpx;
color: #AF681B;
font-size: 28rpx;
background: #fff;
padding: 0 22rpx;
margin: 16rpx 0;
}
.b-item{
width: 100%;
padding: 22rpx;
background: #fff;
border-radius: 24rpx;
margin-bottom: 24rpx;
font-size: 28rpx;
color: #CC8E46;
}
.w180{
width: 180rpx;
text-align: center;
}
.loading-status{
text-align: center;
font-size: 28rpx;
color: #B9B9B9;
}
</style>