<template>
 <view class="recharge-details">
 	<u-divider text="服务点充值信息"></u-divider>
 	<view class="content">
 		<view class="card">
			<view class="card-item highlight">
				<text class="label">提现点数</text>
				<text class="value">{{ detail.amount }}</text>
			</view>
 			<view class="card-item">
 				<text class="label">提现时间</text>
 				<text class="value">{{ detail.topdownTime }}</text>
 			</view>
 		</view>
 		<view class="card">
 			<view class="card-item">
 				<text class="label">微信订单号</text>
 				<text class="value">{{ detail.transactionId }}</text>
 			</view>
 			<view class="card-item">
 				<text class="label">系统订单号</text>
 				<text class="value">{{ detail.refundOutTradeNo }}</text>
 			</view>
 		</view>
 	</view>
 	<view class="footer">
 		<button class="return-button" @tap="goBack">返回</button>
 	</view>
 </view>
</template>

<script>
export default {
  data() {
    return {
      detail: {},
      param: {},
    };
  },
  onLoad(e) {
    if (e.id) {
      this.param.id = e.id;
      this.fetchTopDownData();
    }
  },
  methods: {
    fetchTopDownData() {
      this.http.request({
        url: '/level-one-server/app/WalletManage/getTopDownById',
        data: this.param,
        success: res => {
          this.detail = res.data.data;
        }
      });
    },
    goBack() {
      uni.navigateBack({
        delta: 1
      });
    }
  }
};
</script>

<style lang="scss">
	.recharge-details {
		min-height: 80vh;
		background-color: #f5f7fa;
		display: flex;
		flex-direction: column;
	}

	.header {
		background-color: #007AFF;
		padding: 40rpx 30rpx;
		display: flex;
		align-items: center;
		position: relative;

		.back-button {
			position: absolute;
			left: 30rpx;

			.icon-back {
				font-size: 40rpx;
				color: #ffffff;
			}
		}

		.title {
			flex: 1;
			text-align: center;
			color: #ffffff;
			font-size: 36rpx;
			font-weight: bold;
		}
	}

	.content {
		flex: 1;
		padding: 30rpx;
	}

	.card {
		background-color: #ffffff;
		border-radius: 20rpx;
		padding: 30rpx;
		margin-bottom: 30rpx;
		box-shadow: 0 4rpx 12rpx rgba(0, 0, 0, 0.05);
	}

	.card-item {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 20rpx 0;
		border-bottom: 1rpx solid #f0f0f0;

		&:last-child {
			border-bottom: none;
		}

		.label {
			color: #666666;
			font-size: 28rpx;
		}

		.value {
			color: #333333;
			font-size: 28rpx;
			font-weight: 500;
		}

		&.highlight {

			.label,
			.value {
				color: #007AFF;
				font-weight: bold;
			}
		}
	}

	.footer {
		padding: 30rpx;
	}

	.return-button {
		background-color: #007AFF;
		color: #ffffff;
		border: none;
		border-radius: 50rpx;
		padding: 20rpx 0;
		font-size: 32rpx;
		font-weight: bold;
		box-shadow: 0 4rpx 12rpx rgba(0, 123, 255, 0.3);
		transition: all 0.3s ease;

		&:active {
			transform: translateY(2rpx);
			box-shadow: 0 2rpx 6rpx rgba(0, 123, 255, 0.3);
		}
	}

	// 添加一个简单的图标字体，用于返回按钮
	@font-face {
		font-family: 'iconfont';
		src: url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAKcAAsAAAAABlAAAAJPAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCcApsgQ0BNgIkAwgLBgAEIAWEbQc2G7oFyK4wbuGJaCVsrXwzCN5Xzef9nLtvzMwHRJIoiAlKQqKQIlGah3TvpF7pzvL/udLXgDhQy0QkqtWuZ87sJvSGnCqkQh6Q0/+cXm0CDnx+oEvNg9oATlsDjLMosgIpIG8Yu8AlPCbQaVYjcVhZ3wIlhTEvEE8MoYBSllQpDW1DvWJjEW9Aazo9Th+BN//9+JeKUkmaMvPi/nHFBco/a3+Wg/9BdAQIEEFwvY2MNSARJ5WZQ1IwLqmTn2WwBdVq8bP2/ycysFXkv7wiyGrIbmAKs+RnrRQEP2vVIPEOXTqx3wTEY7A3cDgFx0vS1d0GlBSIyG5/3Nvde7h69Xrn6Qvd9auDZyuHV3fXL1+ygbZuHT6+Vgm7eAFOx84eX3/Rde7MwZHo9trZ3UtHR3fvHt1dO9c9gu7t3e2jI+jcNbJ/dHvvLrq1tn9y7eDZ9aNn+4/uQNf2T+/t3L3qcPzm9E3H/wdxWPy0z7z9fKs5bK+8mQ+TJfCt/OnGX+Vgp+Dj/0j4N1/8Gx/yEXxrBqXzrWGAn7WfYMFEo2HLlKYGOxSC3KBTJxCtxlHSbgp9Gu3zO3XqhEqLSiVkncYwGbWGRpc1qNVpC52u2F3dZUQpRjpYMQ+h3wVJr0/I+n1hMuoTGqO+odYfJnS6j5hL7LIaZuVYDFGhGPsPnYeKJOlGzTvyNZSLOhPlC49oCnOy4Pk5Z0SKsUNu4SJcFxmGiSAXLuA8dF0Jznmm6FNRqLgxjOp4iEIhDLP/QMdDCimlNjjz/XwNygo1J1Qgki+kUjBOLEGnHycJIdXKdqhbqpZwusAwGEkgXOACctEpCeQ4Ty/RR4lCCo3JFKqOK4r1+TXSD+5AJ+NRpMhRokIdGvQcY6YZk0o6lZRTq5kRAAA=') format('woff2');
	}

	.iconfont {
		font-family: "iconfont" !important;
		font-style: normal;
		-webkit-font-smoothing: antialiased;
		-moz-osx-font-smoothing: grayscale;
	}

	.icon-back:before {
		content: "\e697";
	}
</style>