<template>
	<view class="refund">
		<view class="refund-navbar">
			<u-navbar title="退货退款详情" :border-bottom="false" :background="background"></u-navbar>
		</view>
		<view class="refund-hd">
			<view class="l">
				<view class="a">商家已同意退货/退款申请</view>
				<view class="b">
					剩余：<u-count-down :timestamp="timestamp" format="DD天HH时mm分ss秒"></u-count-down>
				</view>
			</view>
			<view class="r">
				<image src="@/static/news/refund-01.png"></image>
			</view>
		</view>
		<view class="refund-bd">
			<view class="a">卖家已同意退货申请，请尽早发货</view>
			<view class="b">
				<view class="l">退货说明：</view>
				<view class="r"><text>●</text>未与商家协商一致请勿平邮或到付。</view>
				<view class="r"><text>●</text>我是退货说明。</view>
			</view>
			<view class="c">
				<view class="btn">撤销申请</view>
			</view>
		</view>
		<view class="refund-fd">
			<view class="l">
				<view class="a">退款原因</view>
				<view class="b">不喜欢，效果不好</view>
			</view>
			<view class="l">
				<view class="a">退款金额</view>
				<view class="b">¥3323</view>
			</view>
			<view class="l">
				<view class="a">退款时间</view>
				<view class="b">2023-12-12 18:30</view>
			</view>
			<view class="l">
				<view class="a">退款编号</view>
				<view class="b">3880404038400808408</view>
			</view>
		</view>
	</view>
</template>

<script>
	import img from "@/static/news/refund-bg.png"
	import * as refundApi from '@/api/refund'
	export default {
		data() {
			return {
				timestamp: 24 * 3600 * 1000,
				background: {
					background: 'url(' + img + ') center -44px no-repeat',
					backgroundSize: '100%',
				}
			}
		},
		onLoad(op) {
			this.getRefundDetails(op.orderRefundId)
		},
		methods: {
			getRefundDetails(orderRefundId) {
				const app=this
				refundApi.detail(orderRefundId)
					.then(result => {
						app.refundDetails = result.data.detail
					})
			},
		}
	}
</script>

<style lang="scss" scoped>
	.refund {
		width: 100%;
		overflow: hidden;

		&-hd {
			height: 206rpx;
			background: linear-gradient(180deg, #FCE2E7 0%, #FFFFFF 100%);
			display: flex;
			align-items: center;
			justify-content: center;
			padding: 0 60rpx;
			box-sizing: border-box;

			.l {
				flex: 1;
				overflow: hidden;

				.a {
					font-size: 32rpx;
					font-weight: 500;
					color: #262626;
				}

				.b {
					display: flex;
					align-items: center;
					margin-top: 30rpx;
					font-size: 28rpx;
					font-weight: 500;
					color: #F55349;
				}
			}

			.r {
				margin-left: 100rpx;
				overflow: hidden;

				image {
					width: 114rpx;
					height: 129rpx;
				}
			}
		}

		&-bd {
			background-color: #FFFFFF;
			padding: 35rpx 60rpx;
			margin-top: 20rpx;

			.a {
				font-size: 28rpx;
				font-weight: 500;
				color: #262626;
			}

			.b {
				margin-top: 20rpx;
				font-size: 28rpx;

				.l {
					font-weight: 400;
					line-height: 60rpx;
					color: #959595;
				}

				.r {
					text {
						margin-right: 30rpx;
					}

					color: #959595;
					line-height: 60rpx;
					position: relative;
				}
			}

			.c {
				padding: 20rpx 0 0;
				overflow: hidden;
				display: flex;
				justify-content: flex-end;

				.btn {
					width: 250rpx;
					text-align: center;
					line-height: 70rpx;
					border: 1px solid #ddd;
					border-radius: 12rpx;
					font-size: 30rpx;
					color: #555;
				}
			}
		}

		&-fd {
			background-color: #FFFFFF;
			padding: 10rpx 60rpx;
			overflow: hidden;
			margin-top: 20rpx;

			.l {
				display: flex;
				align-items: center;
				padding: 20rpx 0;
				font-size: 28rpx;
				color: #959595;

				.b {
					margin-left: 30rpx;
					color: #484848;
				}
			}
		}
	}
</style>
