<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}} 分钟
						{{list.money}}
					</view>
					<view class="text" v-if="list.type == 1">
						充值金额
					</view>
					<view class="nums" v-if="list.type == 2">
						提现金额{{list.money}}
					</view> -->
					<view class="num">
						<view class="info_li">
							<view class="text">
								变动金额
							</view>
							<view class="text" style="color: #8883F0;font-size: 60rpx;">
								￥{{list.amount == undefined ? '--' : list.amount}}
							</view>
						</view>
					</view>
					
				</view>
				<view class="card_bot">
					<view class="info_li">
						<view class="text">
							变动日期
						</view>
						<view class="text">
							{{list.createTime == undefind ? '--' : list.createTime}}
						</view>
					</view>
					<view class="info_li">
						<view class="text">
							变动前余额
						</view>
						<view class="text">
							￥{{list.beforeBalance == undefind ? '--' : list.beforeBalance}}
						</view>
					</view>
					<view class="info_li">
						<view class="text">
							变动后余额
						</view>
						<view class="text">
							￥{{list.afterBalance == undefind ? '--' : list.afterBalance}}
						</view>
					</view>
					<view class="info_li">
						<view class="text">
							用户名称
						</view>
						<view class="text">
							{{list.userName == undefind ? '--' : list.userName}}
						</view>
					</view>
					
					<view class="info_li">
						<view class="text" style="width: 120rpx;">
                             变动原因
						</view>
						<view class="text">
							{{list.reason == undefind ? '--' : list.reason}}
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				bgc: {
					backgroundColor: "#8883f0",
				},
				list: {},
				payType: ''
			}
		},
		// 分享到好友（会话）
		onShareAppMessage: function() {
			return {
				title: '创想物联',
				path: '/pages/shouye/index'
			}
		},

		// 分享到朋友圈  
		onShareTimeline: function() {
			return {
				title: '创想物联',
				query: '',
				path: '/pages/shouye/index'
			}
		},
		onLoad(option) {
			// console.log(option)
			this.getdetail(option.id)
		},
		methods: {
			getdetail(id) {
				this.$u.get("/app/recordBalance/" + id).then((res) => {
					if (res.code == 200) {
						this.list = res.data
					}
				})
			},

		}
	}
</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;
				.text {
					text-align: center;
					width: 100%;
					height: 20rpx;
					font-weight: 400;
					font-size: 28rpx;
					color: #808080;
					margin-top: 20rpx;
				}

				.num {
					text-align: center;
					// margin-top: 18rpx;
					padding-top: 10rpx;
					box-sizing: border-box;
					font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
					font-weight: 400;
					// font-size: 60rpx;
					color: #8883F0;
					font-size: 36rpx;
				}

				.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: 20rpx;
					width: 560rpx;
					display: flex;
					flex-wrap: nowrap;
					justify-content: space-between;

					.text {


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