<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 mt-20 pl-20">
				<view class="rows rowsm">
					<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: 400rpx;">{{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>
			<view class="w100 rows rowsm rowsa mt-20">
				<view class="rows rowsl rowsm colfff" style="width: 40%;">
					<text class="fs-44 fw-b">{{prams.share_price||0.00}}</text>
					<text class="fs-26 mt-10">分红积分</text>
				</view>
				<view class="rows rowsl rowsm colfff" style="width: 40%;">
					<text class="fs-44 fw-b">{{prams.dong_price||0.00}}</text>
					<text class="fs-26 mt-10">未释放分红</text>
				</view>
				<view class="rows rowsl rowsm colfff" style="width: 40%;">
					<text class="fs-44 fw-b">{{prams.price||0.00}}</text>
					<text class="fs-26 mt-10">分红累计补贴</text>
				</view>
			</view>
			<view class="w100 rows rowsm rowsl mt-20" v-if="list.length>0">
				<view class="w-702 rows rowsm rowsb p-all-20 bgff br-20 mb-20" v-for="(item,index) in list" :key="index">
					<text class="fs-26 fw-b">{{$tools.timestampToTime(item.createtime)}}{{item.memo||''}}</text>
					<text class="fs-26 fw-b col">{{item.status==='1'?'+':'-'}}{{item.money}}</text>
				</view>
				<view class="w100 h-230"></view>
			</view>
			<view class="w100 rows rowsc h-600 rowsm" v-else>
				<image class="w-436 h-366" src="/static/other/5.png" mode=""></image>
			</view>
		</view>
		<view class="w100 rows rowsc fixed" style="bottom: 50rpx;">
			<view class="w-702 p-all-20 bgff br-20 rows rowsm rowsa">
				<view class="rows rowsl rowsm" style="width: 40%;">
					<text class="fs-44 fw-b col">{{prams.day_price||0.00}}</text>
					<text class="fs-26 mt-10">今日累计分红</text>
				</view>
				<view class="rows rowsl rowsm" style="width: 40%;">
					<text class="fs-44 fw-b col">{{prams.month_price||0.00}}</text>
					<text class="fs-26 mt-10">当月累计分红</text>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				infor:{},
				list:[],
				prams:{}
			}
		},
		onShow() {
			this.index()
			this.bonusList()
		},
		methods: {
			index(){
				this.$tools.axiosFrom("POST","user/index").then(res => {
					this.infor = res.data
				})
			},
			bonusList(){
				this.$tools.axiosFromToken("POST","promotion/bonusList").then(res => {
					this.list = res.data.list
					this.prams = res.data.info
				})
			}
		}
	}
</script>

<style>
	page{
		background-color: #F7F6FA;
	}
	.page{
		width: 750rpx;
		height: 678rpx;
		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>