123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270 |
- <template>
- <view class="team-box">
- <!-- <top :show-img="false"></top>-->
- <en-nav v-show="false" :title="$t('index.index.tds')"></en-nav>
- <view class="box-list">
- <view class="team-data">
- <view class="user-data">
- <view class="user-img">
- <image src="@/static/img/my/user.png" ></image>
- <view class="user-level">V{{member.level_id}}</view>
- </view>
- <view class="user-address">{{member.address}}</view>
- </view>
- </view>
- <view class="team-title">
- <view class="title-text">{{ $t('index.team.ztlb') }}</view>
- <view class="title-wire"></view>
- </view>
- <view class="team-list">
- <view class="item" v-for="(item,itemIndex) in list">
- <view class="team-item" :class="{'item-one':itemIndex===0}">
- <view class="item-left">
- <view class="left-img"> <image src="@/static/img/my/user.png" ></image></view>
- <view class="left-text">
- <view class="text-name">{{getAddress(item.address)}}</view>
- <view class="text-time">{{ $t('index.team.rtsj') }}:{{item.created_at}}</view>
- </view>
- </view>
- <view class="item-right">V{{item.level_id}}</view>
- </view>
- </view>
- <en-blank v-if="list.length<=0"></en-blank>
- </view>
- </view>
- </view>
- </template>
- <script>
- // import Top from "@/pages/index/model/top";
- import EnBlank from "@/components/en-utils/en-blank/en-blank";
- import tools from "@/common/js/tools";
- import {getTeamInfo, getTeamList} from "@/api/member";
- import EnNav from "@/components/en-utils/en-nav/en-nav";
- export default {
- name: "team",
- components: {EnNav, EnBlank},
- props: {},
- data() {
- return {
- member:{
- "address": "",
- "level_id": 0,
- "recom_num": 0,
- "performance": 0,
- },
- 'list':[],
- page:1,
- isEnd:false
- }
- },
- watch: {},
- onReachBottom(){
- this.getTeamList()
- },
- mounted() {
- this.getTeamInfo()
- this.getTeamList()
- },
- methods: {
- getAddress(address){
- return tools.getAddress(address)
- },
- getTeamInfo(){
- getTeamInfo().then((res)=>{
- if(res.code===1){
- res.data.address=tools.getAddress(res.data.address)
- this.member=res.data
- console.log( this.member.address)
- }
- })
- },
- getTeamList(){
- if(this.isEnd){
- return
- }
- getTeamList().then((res)=>{
- if(res.code===1){
- if(res.data.items.length<=0){
- this.isEnd=true
- }
- this.list.push(...res.data.items)
- ++this.page
- }
- })
- }
- }
- }
- </script>
- <style scoped lang="scss">
- .box-list{
- padding: 6px 16px;
- .team-data{
- background: #fff;
- margin-top: 20rpx;
- padding: 20rpx;
- border-radius: 10rpx;
- .user-data{
- .user-img{
- margin:24rpx auto;
- width: 140rpx;
- height: 140rpx;
- position: relative;
- image{
- border-radius: 50%;
- width: 140rpx;
- height: 140rpx;
- }
- .user-level{
- position: absolute;
- bottom: 0;
- left: 30rpx;
- width: 80rpx;
- background: #277ffa;
- border-radius: 20rpx;
- text-align: center;
- color: #fff;
- font-size: 22rpx;
- }
- }
- .user-address{
- margin: 0 auto;
- width: 240rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- text-align: center;
- }
- padding-bottom: 20rpx;
- border-bottom: 2rpx solid #EAEAEA;
- }
- .team-info{
- margin-top: 20rpx;
- display: flex;
- justify-content: space-between;
- .team-item{
- width: 50%;
- .user-img{
- margin:0 auto;
- width: 100rpx;
- height: 100rpx;
- position: relative;
- image{
- border-radius: 50%;
- width: 100rpx;
- height: 100rpx;
- }
- .user-level{
- position: absolute;
- bottom: 0;
- left: 18rpx;
- width: 70rpx;
- background: #277ffa;
- //height: 20rpx;
- border-radius: 20rpx;
- text-align: center;
- color: #fff;
- font-size: 16rpx !important;
- }
- }
- .item{
- text-align: center;
- }
- .item-num{
- color: #333;
- font-size: 34rpx;
- font-weight: 600;
- }
- .item-text{
- margin: 6rpx auto 0;
- color: #999999;
- font-size: 28rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- width: 240rpx;
- text-align: center;
- }
- }
- }
- }
- .team-title{
- margin: 30rpx 0;
- .title-text{
- color: #277ffa;
- font-size: 28rpx;
- font-weight: 600;
- }
- .title-wire{
- background: #277ffa;
- width: 60rpx;
- height: 4rpx;
- margin-left: 24rpx;
- }
- }
- .team-list{
- background: #fff;
- padding: 24rpx 21rpx;
- min-height: 600rpx;
- border-radius: 20rpx;
- .team-child{
- padding-left: 30rpx;
- }
- .team-item{
- padding: 24rpx 0;
- display: flex;
- justify-content: space-between;
- border-bottom: 2rpx solid #EDEDED;
- .item-left{
- display: flex;
- justify-content: left;
- .left-img{
- width: 88rpx;
- image{
- height: 88rpx;
- width: 88rpx;
- border-radius: 50%;
- }
- }
- .left-text{
- margin-left: 16rpx;
- .text-name{
- color: #333333;
- font-size: 28rpx;
- width: 240rpx;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .text-time{
- margin-top: 20rpx;
- color: #999999;
- font-size: 20rpx;
- }
- }
- }
- .item-right{
- width: 72rpx;
- height: 34rpx;
- background: #277ffa;
- color: #fff;
- text-align: center;
- line-height: 34rpx;
- border-radius: 20rpx;
- margin-top: 30rpx;
- font-size: 20rpx;
- }
- }
- .item-one{
- padding-top: 0;
- }
- }
- }
- </style>
|