<template>
	<view class="center">
		<view>
			<u-navbar :autoBack="true" bgColor="#1FCA7C" placeholder="true" leftIconColor="#FFF" title="生活缴费"
				:title-style="{color: '#FFF'}"></u-navbar>
		</view>
		<view style="background: linear-gradient( 180deg, #1FCA7C 0%, #F2F2F2 100%);height: 800rpx;"></view>
		<view style="margin-top: -800rpx;"></view>
		<view class="fs-36 fw-600 mt-30 ml-20" style="text-align: left;color: #fff;">
			<text>你好，{{userinfo.communityName+userinfo.room}}</text>
		</view>

		<view class="mar-20 br-16" style="background-color: white;flex: 1;
			overflow-y: auto;">
			<scroll-view scroll-y style="height: 100%;">
				<view class="list-container">
					<view @click="onClick(index)" class="list-item" v-for="(item, index) in listService" :key="index">
						<view style="align-items: top;height: 100%;">
							<image style="width: 48rpx;height: 48rpx;margin-top: 30rpx;" :src="item.img"></image>
						</view>
						<view class="flex-column mlr-30 fs-30" style="flex: 1;text-align: left;">
							<text class="fw-700 fs-30">{{item.title}}</text>
							<text class="mtb-10 fw-700 fs-30">预存缴费</text>
							<text class="fs-24" style="color: #999999;">河南利龙物业管理有限公司</text>
						</view>
						<text class="plr-15 ptb-10 br-4 fs-24"
							style="border: 1px solid #1FCA7C;color: #1FCA7C;">去查看</text>
					</view>
				</view>
			</scroll-view>

		</view>
	</view>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				userinfo: '',
				listService: [{
						img: "/pagesMain/static/icon_shjf_1.png",
						title: "电费",
					},
					{
						img: "/pagesMain/static/icon_shjf_2.png",
						title: "水费",

					},
					{
						img: "/pagesMain/static/icon_shjf_3.png",
						title: "物业费",
					},
					{
						img: "/pagesMain/static/icon_shjf_4.png",
						title: "停车位管理费",
					},
					{
						img: "/pagesMain/static/icon_shjf_5.png",
						title: "车位出租费",
					},
					{
						img: "/pagesMain/static/icon_shjf_6.png",
						title: "储藏室出租",
					},
					{
						img: "/pagesMain/static/icon_shjf_7.png",
						title: "其他缴费",
					}
				],
			};
		},
		onLoad(options) {
			this.userinfo = uni.getStorageSync("userInfo")
		},
		methods: {
			open() {
				// console.log('open');
			},
			close() {
				this.show = false
				// console.log('close');
			},
			onClick(index) {
				if (index == 0) {
					this.$wskj.to("/pagesMain/pages/jnzd?type=1")
					return
				}
				if (index == 1) {
					this.$wskj.to("/pagesMain/pages/jnzd?type=2")
					return
				}
				if (index == 2) {
					this.$wskj.to("/pagesMain/pages/jnzd_wyfmx")
					return
				}
				if (index == 3) {
					this.$wskj.to("/pagesMain/pages/jnzd_tcfmx")
					return
				}
				if (index == 4) {
					this.$wskj.to("/pagesMain/pages/jnzd_czf?type=0")
					return
				}
				if (index == 5) {
					this.$wskj.to("/pagesMain/pages/jnzd_ccs")
					return
				}
				if (index == 6) {
					this.$wskj.to("/pagesMain/pages/jnzd_qt")
					return
				}
			}
		}
	};
</script>

<style>
	.center {
		height: 100vh;
		display: flex;
		flex-direction: column;
		background: #f5f5f5;
	}

	.list-container {
		display: flex;
		flex-direction: column;
	}

	.list-item {
		height: 200rpx;
		display: flex;
		flex-direction: row;
		align-items: center;
		padding: 0 20rpx;
		border-radius: 6rpx;
		margin: 0 20rpx;
		margin-top: 30rpx;
		background: #DFF4E8;
	}
</style>