<template>
	<!-- 订单详情  状态支付退款成功 -->
	<view class="order-details">
		<view class="order-details-content">
			<view class="order-details-content-header">
				<image src="../../static/img/refund-success.png"></image>
				<view>+{{details.refundAmount}}</view>
			</view>
			<view class="order-details-content-item">
				<view>当前状态</view>
				<view>已全额退款</view>
			</view>
			<view class="order-details-content-item">
				<view>退款时间</view>
				<view>{{details.auditTime}}</view>
			</view>
			<view class="order-details-content-item">
				<view>退款方式</view>
				<view>退回原支付账户</view>
			</view>
			<view class="order-details-content-item">
				<view>退款单号</view>
				<view>{{details.refundNo}}</view>
			</view>
		</view>
		<u-toast ref="uToast" />
	</view>
</template>

<script>
	export default {
		data() {
			return {
				details: {}
			}
		},
		onLoad(page) {
			this.getOrderRefundDetails(page.orderId)
		},
		methods: {
			getOrderRefundDetails(orderId) {
				this.$u.api.getOrderRefundDetails({
					orderId: orderId
				})
					.then(res => {
						console.log(res)
						if (res.code === 200) {
							this.details = res.data
						}
					})
					.catch(err => {
						this.$refs.uToast.show({
							title: '操作失败',
							type: 'error'
						})
					})
			}
		}
	}
</script>

<style lang="scss" scoped>
@import './applyRefundDetails.scss';
</style>
