<template>
	<view class="container">
		<view class="page">
			<view class="property">
				<view class="top">
					<view class="user" style="background-image: url('../../static/images/bg_cost.png');">
						<view class="name">张一 15214525682</view>
						<view class="add">十堰市张湾区汉江之星小区1栋1302</view>
					</view>
					<view class="link">
						<view class="tit on" @click="toDetail(1)">历史缴费统计</view>
						<view class="tit" @click="toDetail(2)">缴费记录</view>
					</view>
				</view>
				<view class="list">
					<view class="item">
						<view class="title">
							<view class="name">物业费：<view class="cost">¥3000.00</view>
							</view>
							<view class="tag">去缴费</view>
						</view>
						<view class="content">
							<view class="text">
								<view class="name">缴费周期</view>
								<view class="detail">1个月</view>
							</view>
							<view class="text">
								<view class="name">创建日期</view>
								<view class="detail">2023年3月1日</view>
							</view>
							<view class="text">
								<view class="name">缴费单位</view>
								<view class="detail">汉江之星物业公司</view>
							</view>
						</view>
					</view>
					<view class="item">
						<view class="title">
							<view class="name">物业费：<view class="cost">¥3000.00</view>
							</view>
							<view class="tag">去缴费</view>
						</view>
						<view class="content">
							<view class="text">
								<view class="name">缴费周期</view>
								<view class="detail">1个月</view>
							</view>
							<view class="text">
								<view class="name">创建日期</view>
								<view class="detail">2023年3月1日</view>
							</view>
							<view class="text">
								<view class="name">缴费单位</view>
								<view class="detail">汉江之星物业公司</view>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		methods: {
			toDetail(type) {
				if(type == 1){
					uni.navigateTo({
						url: '/pages/payCostStatistical/index',
					});
				}else if(type == 2){
					uni.navigateTo({
						url: '/pages/payCostRecord/index',
					});
				}
			}
		},
		onLoad() {

		},
		onShow() {

		}
	}
</script>
<style>
	page {
		background-color: #F8F6F9;
	}
</style>
<style lang="scss" scoped>
	.page {
		padding: 30rpx 30rpx 90rpx;
		background-color: #F8F6F9;
	}

	.property {
		.top {
			border-radius: 16rpx;
			background-color: #E8E5FF;
			margin-bottom: 30rpx;

			.user {
				background-position: top center;
				background-repeat: no-repeat;
				background-size: cover;
				border-radius: 16rpx;
				padding: 40rpx;

				.name {
					font-size: 32rpx;
					color: #ffffff;
					margin-bottom: 20rpx;
				}

				.add {
					font-size: 28rpx;
					color: #D5DCFF;
				}
			}

			.link {
				display: flex;
				padding: 24rpx 0;

				.tit {
					width: 49%;
					font-size: 28rpx;
					color: #6A59F2;
					text-align: center;
				}

				.on {
					border-right: 1px solid #D6D3EC;
				}
			}
		}

		.list {
			.item {
				background-color: #ffffff;
				border-radius: 16rpx;
				padding: 30rpx;
				margin-bottom: 30rpx;

				.title {
					height: 40rpx;
					line-height: 40rpx;
					margin-bottom: 30rpx;
					display: flex;
					justify-content: space-between;

					.name {
						font-size: 28rpx;
						color: #9D9CA6;
						display: flex;

						.cost {
							font-size: 36rpx;
							color: #6A59F2;
							font-weight: bold;
						}

					}

					.tag {
						height: 36rpx;
						line-height: 36rpx;
						font-size: 22rpx;
						padding: 4rpx 20rpx;
						color: #FEFEFE;
						background-color: #6A59F2;
						border-radius: 36rpx;
					}
				}


				.content {
					border-top: 1px solid #F0F0F2;
					padding-top: 20rpx;

					.text {
						display: flex;
						height: 60rpx;
						line-height: 60rpx;

						.name {
							width: 180rpx;
							font-size: 28rpx;
							color: #9D9CA6;
						}

						.detail {
							font-size: 28rpx;
							color: #373737;
						}
					}
				}

			}
		}
	}

</style>