<template>
	<view class="container">
		<navBar title="推广团队" :back="true" color="#333333" background="#FFFFFF" />

		<view class="topBox" :style="{'background-image':`url(${picBase+'team_bg.png'})`}">
			<view class="bar">
				<!-- <view class="tag">
					TIPS
				</view> -->
				<image :src="picBase+'hb_tips.png'" mode="" class="tag"></image>
				团队人数 {{list.length}}人
			</view>
		</view>

		<view class="mianContent" :style="{'background-image':`url(${picBase+'my_b_bg.png'})`}">
			<!-- <view class="mianContent"> -->
			<!-- <view class="sanjiaoxing">
			</view> -->

			<view class="tPos">

			</view>
			<view class="list">
				<view class="empty" style="margin-top: 50%;" v-if="list.length==0">
					<u-empty mode="data" />
				</view>


				<view class="" v-else>
					<view class="item" v-for="(item,index) in list"
						:style="{'background-image':`url(${picBase+'card_b.png'})`}">
						<view class="left">
							<image :src="!item.avatar?picBase+'defaultAvatar.png':item.avatar" mode="" class="avatar">
							</image>
							<view class="des">
								<view class="name">
									{{item.name?item.name:'默认用户'}}
								</view>
								<view class="time">
									{{item.share_date}}
								</view>
							</view>
						</view>
						<view class="right">
							<view class="money">
								￥{{item.amount_sum_amount}}
							</view>
							<view class="count">
								充值次数{{item.order_count}}
							</view>
						</view>
					</view>
				</view>

			</view>


		</view>
	</view>
</template>

<script>
	// import navBar from '@/components/navBar/index.vue'

	import {
		getTeam,
	} from '@/api/index/index.js'
	export default {
		// components: {
		// 	navBar
		// },
		data() {
			return {
				picBase: this.$picBase2,
				list: []
			}
		},
		onLoad() {
			this.getTeam()
		},
		methods: {
			async getTeam() {
				let res1 = await getTeam()
				console.log('团队返回值--------', res1);
				if (res1.code == 0) {
					this.list = res1.data.data
					// this.list = []
				} else {
					this.$toast(res1.message)
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	@import "./index.scss";
</style>