<template>
	<view>
		<u-navbar title="账单详情" :border-bottom="false" :background="bgc" back-icon-color="#fff" title-color='#fff' title-size='36'
			height='50'></u-navbar>
		<view class="cont">
			<view class="order_card">
				<view class="cardtop">
					<view class="text" v-if="list.status == 2">
						已支付 
					</view>
					<view class="text" v-if="list.status == 1">
						未支付 
					</view>
					<view class="text" v-if="list.status == 3">
						已退款 
					</view>
					<view class="text" v-if="list.status == 4">
						已取消(用户) 
					</view>
					<view class="text" v-if="list.status == 5">
						已取消(系统) 
					</view>
					<view class="text" v-if="list.status == 6">
						支付中 
					</view>
					<view class="num" v-if="list.type == 1">
						{{list.suitTime}} 分钟
					</view>
					<view class="text" v-if="list.type == 1">
						充值金额{{list.money}}
					</view>
					<view class="nums" v-if="list.type == 2">
						提现金额{{list.money}}
					</view>
				</view>
				<view class="card_bot">
					<view class="info_li">
						<view class="text" v-if="list.type == 1">
							到账日期
						</view>
						<view class="text" v-if="list.type == 2">
							提现日期
						</view>
						<view class="text">
							{{list.createTime}}
						</view>
					</view>
					<view class="info_li" v-if="list.type == 1">
						<view class="text">
							充值设备
						</view>
						<view class="text">
							{{list.deviceName}}
						</view>
					</view>
					<view class="info_li">
						<view class="text" v-if="list.type == 1">
							充值类型
						</view>
						<view class="text" v-if="list.type == 2">
							提现类型
						</view>
						<view class="text">
							{{list.channelName}}
						</view>
					</view>
					<view class="info_li"> 
						<view class="text" v-if="list.type == 1">
							充值用户
						</view>
						<view class="text" v-if="list.type == 2">
							提现用户
						</view>
						<view class="text">
							{{list.userName}}
						</view>
					</view>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				bgc: {
					backgroundColor: "#8883f0",
				},
				list: {},
				payType: ''
			}
		},
		onLoad(option) {
			// console.log(option)
			this.getdetail(option.id)
		},
		methods: {
			getdetail(id) {
				this.$u.get("/app/bill/" + id).then((res) => {
					if (res.code == 200) {
						this.list = res.data
						// if (res.data.payType == 1) {
						// 	this.payType = '微信支付'
						// } else if (res.data.payType == 2) {
						// 	this.payType = '支付宝'
						// } else if (res.data.payType == 3) {
						// 	this.payType = '银行卡'
						// }
					}
				});
			},
		}
	}
</script>

<style lang="scss">
	/deep/ .u-title{
		padding-bottom: 22rpx;
	}
	/deep/ .u-icon__icon{
		padding-bottom: 22rpx;
	}
	page {
		background: #F7FAFE;
	}

	.cont {
		display: flex;
		// justify-content: center;
		flex-wrap: wrap;

		// width: 594rpx;
		.order_card {
			margin: 0 auto;
			width: 700rpx;
			height: 638rpx;
			background-image: url('https://api.ccttiot.com/smartmeter/img/static/uXunwgElpYwvDbER83W0');
			background-size: 100% 100%;
			background-repeat: no-repeat;

			.cardtop {
				margin-top: 48rpx;
                height: 190rpx;
				// display: flex;
				// flex-wrap: wrap;
				// justify-content: center;
				.text {
					text-align: center;
					width: 100%;
					height: 20rpx;
					font-weight: 400;
					font-size: 28rpx;
					color: #808080;
				}

				.num {
					text-align: center;
					margin-top: 18rpx;
					font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
					font-weight: 400;
					font-size: 60rpx;
					color: #8883F0;
				}
                .nums {
                	text-align: center;
                	padding-top: 48rpx;
                	font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
                	font-weight: 400;
                	font-size: 60rpx;
                	color: #8883F0;
                }
                
			}

			.card_bot {
				margin: 0 auto;
				margin-top: 20rpx;
				width: 560rpx;
				text-align: center;

				.info_li {
					margin-top: 35rpx;
					width: 560rpx;
					display: flex;
					flex-wrap: nowrap;
					justify-content: space-between;

					.text {


						font-weight: 400;
						font-size: 28rpx;
						color: #808080;
					}
				}
			}
		}
	}
</style>