<template>
	<view>
		<view class="page">
			<view class="w100 h-180 relative">
				<uni-nav-bar left-icon="back" title="我的推广" :border="false" backgroundColor="transparent" class="fw-b" color="#fff" @clickLeft="$tools.goBack()"></uni-nav-bar>
			</view>
			<view class="w100 rows rowsm rowsb mt-20 pl-20">
				<view class="rows rowsm" v-if="infor&&infor.id">
					<view class="w-164 h-164 br-24 mr-20" style="border: 4rpx solid #fff;">
						<image class="w100 h100 br-24" :src="$tools.oss(infor.avatar)" mode="aspectFill"></image>
					</view>
					<view class="h-164 rows rowsl rowsb">
						<view class="rows rowsm">
							<view class="fs-36 fw-b colfff mr-20 one_overflow" style="max-width: 300rpx;">{{infor.nickname}}</view>
							<view class="pl-10 pr-10 bgff rows rowsc rowsm h-38 col fs-24 fw-b br-100" v-if="infor.level==1">酒鬼</view>
							<view class="pl-10 pr-10 bgff rows rowsc rowsm h-38 col fs-24 fw-b br-100" v-if="infor.level==2">酒圣</view>
							<view class="pl-10 pr-10 bgff rows rowsc rowsm h-38 col fs-24 fw-b br-100" v-if="infor.level==3">酒王</view>
							<view class="pl-10 pr-10 bgff rows rowsc rowsm h-38 col fs-24 fw-b br-100" v-if="infor.level==4">酒仙</view>
							<view class="pl-10 pr-10 bgff rows rowsc rowsm h-38 col fs-24 fw-b br-100" v-if="infor.level==5">酒神</view>
							<view class="pl-10 pr-10 bgff rows rowsc rowsm h-38 col fs-24 fw-b br-100" v-if="infor.level==6">酒佛</view>
						</view>
						<view class="rows rowsc rowsm w-160 br-10 h-40 colfff fs-26 fw-b" style="border: 2rpx solid #fff;">ID：{{infor.invitation||''}}</view>
						<text class="fs-28 fw-b colfff">{{infor.mobile||''}}</text>
					</view>
				</view>
				<view class="rows rowsm" @click="login" v-else>
					<view class="w-164 h-164 br-24 mr-20" style="border: 4rpx solid #fff;">
						<image class="w100 h100 br-24" src="/static/other/4s.png" mode="aspectFill"></image>
					</view>
					<view class="h-164 rows rowsl rowsc">
						<view class="fs-36 fw-b colfff">未登录</view>
					</view>
				</view>
				<!-- <view class="w-138 h-60 rows rowsc rowsm col bgff" style="border-radius: 38rpx 0 0 38rpx;" @click="$tools.goNext('/pageOne/mes/withdraw')">
					<text class="fw-b fs-24 mr-14">去提现</text>
					<image class="w-20 h-20" src="/static/images/cef.png" mode=""></image>
				</view> -->
			</view>
			<view class="w100 rows rowsm rowsa mt-40">
				<view class="rows rowsl rowsm colfff" style="width: 50%;" @click="$tools.goNext('/pageOne/mes/aaa?type=2&name=消费积分')">
					<text class="fs-44 fw-b">{{infor.score||0.00}}</text>
					<text class="fs-26 mt-10">消费积分</text>
				</view>
				<view class="rows rowsl rowsm colfff" style="width: 50%;" @click="$tools.goNext('/pageOne/mes/aaa?type=3&name=分红积分')">
					<text class="fs-44 fw-b">{{infor.share_price||0.00}}</text>
					<text class="fs-26 mt-10">分红积分</text>
				</view>
				<view class="rows rowsl rowsm colfff" style="width: 50%;" @click="$tools.goNext('/pageOne/mes/aaa?type=4&name=未释放分红')">
					<text class="fs-44 fw-b">{{infor.freeze_price||0.00}}</text>
					<text class="fs-26 mt-10">未释放分红</text>
				</view>
			</view>
			<view class="w100 rows rowsm rowsa mt-20">
				<view class="rows rowsl rowsm colfff" style="width: 50%;" @click="$tools.goNext('/pageOne/mes/aaa?type=1&name=余额')">
					<text class="fs-44 fw-b">{{infor.money||0}}</text>
					<text class="fs-26 mt-10">我的余额</text>
				</view>
				<view class="rows rowsl rowsm colfff" style="width: 50%;">
					<text class="fs-44 fw-b">{{infor.price||0}}</text>
					<text class="fs-26 mt-10">累计余额</text>
				</view>
			</view>
			<view class="w100 rows rowsc mt-30">
				<view class="w-710 br-100 rows rowsm rowsc col h-88 fs-30 fw-b bgff" @click="$tools.goNext('/pageOne/mes/withdraw')">
					<text class="fw-b mr-14">立即提现</text>
					<image class="w-20 h-20" src="/static/images/cef.png" mode=""></image>
				</view>
			</view>
			<view class="w100 rows rowsc mt-30">
				<view class="w-710 p-all-20 rows rowsl rowsc br-24 pl-10 pr-10 bgff">
					<view class="w100 rows rowsm mt-20">
						<view class="rows rowsl rowsm" style="width: 25%;" v-for="(item,index) in menu" :key="index"
						@click="$tools.goNext(item.url)">
							<image class="w-72 h-72" :src="item.icon" mode=""></image>
							<text class="fs-28 col333 mt-20">{{item.name}}</text>
						</view>
					</view>
				</view>
			</view>
			<view class="w100 rows rowsc mt-30">
				<view class="w-710 p-all-20 rows rowsl rowsc br-24 pl-10 pr-10 bgff">
					<view class="w100 rows rowsm rowsa">
						<view class="rows rowsl rowsm" style="width: 50%;" @click="$tools.goNext(`/pageOne/mes/proStatistics?name=推广人列表`)">
							<image class="w-76 h-76" src="/static/images/fr09.png" mode=""></image>
							<text class="fs-28 mt-20">推广人统计</text>
						</view>
						<view class="rows rowsl rowsm" style="width: 50%;" @click="$tools.goNext(`/pageOne/mes/proStatistics?name=团队业绩`)">
							<image class="w-76 h-76" src="/static/images/03hyhy.png" mode=""></image>
							<text class="fs-28 mt-20">团队业绩</text>
						</view>
					</view>
					<view class="w100 rows rowsm rowsa mt-60">
						<view class="rows rowsl rowsm" style="width: 50%;"  @click="$tools.goNext('/pageOne/mes/proRank')">
							<image class="w-76 h-76" src="/static/images/l05ool.png" mode=""></image>
							<text class="fs-28 mt-20">推广人排行</text>
						</view>
						<view class="rows rowsl rowsm" style="width: 50%;"  @click="$tools.goNext('/pageOne/mes/saleRank')">
							<image class="w-76 h-76" src="/static/images/5gy.png" mode=""></image>
							<text class="fs-28 mt-20">销售额排行</text>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				menu:[
					{id:1,name:'循环补贴',icon:'/static/images/01ws.png',url:`/pageOne/mes/subsidyLoop`},
					{id:2,name:'天天补贴',icon:'/static/images/05de.png',url:`/pageOne/mes/subsidyDay`},
					{id:3,name:'分红补贴',icon:'/static/images/06fr.png',url:`/pageOne/mes/subsidyShare`},
					{id:4,name:'我的佣金',icon:'/static/images/02gttg.png',url:`/pageOne/mes/subsidyCom`}
				],
				infor:{}
			}
		},
		onShow() {
			this.index()
		},
		methods: {
			index(){
				this.$tools.axiosFromToken("POST","user/index").then(res => {
					this.infor = res.data
				})
			},
		}
	}
</script>

<style>
	page{
		background-color: #F7F6FA;
	}
	.page{
		width: 750rpx;
		height: 1000rpx;
		background: linear-gradient( 180deg, #E73232 0%, rgba(231,50,50,0.94) 30.45%, rgba(231,50,50,0.91) 53.88%, rgba(231,50,50,0.8) 69.29%, rgba(231,50,50,0.54) 81.67%, rgba(231,50,50,0.26) 90.37%, rgba(231,50,50,0) 100%);
	}
</style>