<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(options) {
    const { orderId } = options;
    this.getOrderRefundDetails(orderId);
  },
  methods: {
    /** 
     * @description: 获取退款详情
     * @param {*} orderId
     * @return {*}
     */
    async getOrderRefundDetails(orderId) {
      const { code, data } = await this.$u.api.getOrderRefundDetails({ orderId });
      if (code === 200) {
        this.details = data;
      }
    }
  }
};
</script>

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