<template>
	<view class="contant">
		<view class="jiedian-box" v-for="(item,index) in jieList" @click="navTo(item.id)">
			<view class="box">
				<view class="box-title">
					<text>用户ID</text>
					{{item.id}}
				</view>
				<view class="box-content">
					<text>团队人数</text>
					{{item.children_num}}
				</view>
				<view class="box-bottom">
					<text>收益</text>
					{{item.get}}
				</view>
			</view>
			<view class="img">
				<image src="../../static/tabBar/tab-home.png" mode="" ></image>
			</view>
		</view>
	</view>
</template>

<script>
	import {lookSubpoints, lookOneself } from '../../api/user.js'
	export default {
		data() {
			return {
				jieList:[]
			};
		},
		onLoad() {
			this.lookMyjiedian()
		},
		onShow() {
			this.lookMyjiedian()
		},
		methods:{
			lookMyjiedian(){
				let obj = this
				lookOneself().then(res=>{
					console.log(res);
					obj.jieList = res.data.points.map(e =>{
						return e
					})
					console.log(obj.jieList,'2222222');
				})
			},
			navTo(id){
				uni.navigateTo({
					url:'./jiedianDetails?id='+id
				})
			}
		}
	}
</script>

<style lang="scss">
	.jiedian-box{
		display: flex;
		justify-content: space-between;
		margin: 30rpx ;
	}

.img{
	width: 50rpx;
	height: 50rpx
	;
	image{
		width: 100%;
		height: 100%;
	}
}
</style>
