<template>
	<view>
		<u-navbar autoBack placeholder bgColor="#FFFFFF">
			<view class="navSlot" slot="center">
				<!-- <u-icon name="arrow-left" size="19"></u-icon> -->
				<view class="title">结算管理</view>
			</view>
		</u-navbar>

		<view class="bgMian">
			<view class="bgImg">
				<view class="settlement">
					<!-- 收入明细总额 -->
				</view>
				<view class="settlementPrice">
					<!-- ￥{{Number(data.alreadySettled) + Number(data.unsettled)}} -->
				</view>
				<view class="bafenlei">
					<view>
						<view class="settlement">
							已结算
						</view>
						<view class="settlementPrice">
							￥{{data.alreadySettled || 0}}
						</view>
					</view>
					<view>
						<view class="settlement">
							未结算
						</view>
						<view class="settlementPrice">
							￥{{data.unsettled || 0}}
						</view>
					</view>
				</view>


			</view>

			<view class="incomeDetails" @click="datails">
				<view>收入明细</view>
				<view>
					<image class="img" src="../../static/tabar/ic_left.png"></image>
				</view>
			</view>
		</view>
	</view>

</template>

<script>
	export default {
		data() {
			return {
				data: {}

			}
		},
		onLoad() {
			this.getsettlementData()
		},
		methods: {
			datails() {
				uni.navigateTo({
					url: "/pages/incomeDetails/incomeDetails"
				})
			},
			getsettlementData() {
				this.$http.get('/api/store/personalCenter/settlementData').then(res => {
					this.data = res.data
				})
			},

		}
	}
</script>

<style lang="scss">
	.bgMian {
		padding-left: 44rpx;
		padding-right: 44rpx;

		.incomeDetails {
			padding: 37rpx;
			background: #FFEEE1;
			display: flex;
			justify-content: space-between;
			border-radius: 18rpx 18rpx 18rpx 18rpx;

			.img {
				width: 11rpx;
				height: 23rpx;
			}
		}

		.bgImg {
			height: 333rpx;
			background-size: 100% 100%;
			background-image: url('/static/bg/bg_se.png');
			.bafenlei{
				display: flex;
				align-items: center;
				justify-content: space-between;
				padding-right: 62rpx;
			}

			.settlementPrice {
				padding-top: 24rpx;
				padding-left: 62rpx;
				font-size: 36rpx;
				color: #FFFFFF;
				font-weight: 800;
			}

			.settlement {
				padding-top: 42rpx;
				padding-left: 62rpx;
				font-size: 24rpx;
				color: #FFFFFF;
			}

			.unsettled {
				padding-top: 53rpx;
				padding-left: 62rpx;
				font-size: 24rpx;
				color: #FFFFFF;
			}
		}
	}
</style>