<template>
  <view class="page-container">

    <view class="content">
      <!-- 退款金额 -->
      <view class="amount-section">
        <text class="amount">¥128.00</text>
        <text class="refund-type">原路退回</text>
      </view>

      <!-- 订单信息 -->
      <view class="info-section">
        <view class="info-item">
          <view class="info-label">退款订单编号</view>
          <view class="info-value">TK202502501212562300127</view>
        </view>
        <view class="info-item">
          <view class="info-label">申请订单时间</view>
          <view class="info-value">2025.12.23 16:00:45</view>
        </view>
        <view class="info-item">
          <view class="info-label">申请时间</view>
          <view class="info-value">2025.12.23 16:00:45</view>
        </view>
        <view class="info-item">
          <view class="info-label">申请时间</view>
          <view class="info-value">2025.12.23 16:00:45</view>
        </view>
      </view>

      <!-- 操作时间线 -->
      <view class="timeline-section">
        <text class="section-title">操作时间</text>
        <view class="timeline">
          <view class="timeline-item" v-for="(item, index) in timelineData" :key="index">
            <view class="timeline-dot">
              <image src="/static/workbench/timeLineIcon.png" style="width: 30rpx;height: 30rpx;" mode="aspectFill" />

            </view>
            <view class="timeline-content">
              <text class="timeline-title">{{ item.title }}</text>
              <text class="timeline-time">{{ item.time }}</text>
            </view>
            <view v-if="index < timelineData.length - 1" class="timeline-line"></view>
          </view>
        </view>
      </view>

      <!-- 查看详情按钮 -->
      <view class="btn-section">
        <view class="btn-detail" @click="goDetail">查看退款详情</view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      timelineData: [
        {
          title: '申请退款',
          time: '2025.12.23 16:00:45'
        },
        {
          title: '平台审核',
          time: '2025.02.02 12:22:00'
        },
        {
          title: '同意退款',
          time: '2025.02.02 12:22:00'
        }
      ]
    }
  },
  methods: {
    goBack() {
      uni.navigateBack()
    },
    goDetail() {
      // 跳转到退款详情页面
      uni.navigateTo({
				url: '/pages/order/moneyDetail'
				//url: '/pages/order/moneyDetail?id=' + this.id
			})
    }
  }
}
</script>

<style scoped lang="scss">
.page-container {
  min-height: 100vh;
  background: #FFFFFF;
}

.content {}

.amount-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48rpx 0 64rpx 0;
  background: #FFFFFF;

  .amount {
    font-weight: 600;
    font-size: 60rpx;
    color: #1D2129;
    text-align: center;
  }

  .refund-type {
    font-weight: 400;
    font-size: 30rpx;
    color: #1D2129;
    text-align: center;
  }
}

.info-section {
  background: #FFFFFF;
  padding: 0 32rpx;

  .info-item {
    padding-bottom: 32rpx;
    display: flex;
    align-items: center;

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

    .info-label {
      font-weight: 400;
      font-size: 30rpx;
      color: #86909C;
      text-align: left;
      width: 182rpx;
    }

    .info-value {
      font-weight: 400;
      font-size: 30rpx;
      color: #1D2129;
      margin-left: 32rpx;
    }
  }
}

.timeline-section {
  background: #FFFFFF;
  border-radius: 16rpx;
  padding: 0 32rpx 80rpx 32rpx;
  display: flex;

  .section-title {
    width: 182rpx;
    font-weight: 400;
    font-size: 30rpx;
    color: #86909C;
    text-align: left;
  }

  .timeline {
    position: relative;
    margin-left: 32rpx;
    padding-left: 40rpx;
  }

  .timeline-item {
    position: relative;
    padding-bottom: 32rpx;

    &:last-child {
      padding-bottom: 0;
    }

    .timeline-dot {
      position: absolute;
      left: -40rpx;
      top: 10rpx;
      width: 30rpx;
      height: 30rpx;
      display: flex;
      align-items: center;
      justify-content: center;

      .dot-inner {
        width: 16rpx;
        height: 16rpx;
        border-radius: 50%;
        background: #FFFFFF;
      }
    }

    .timeline-content {
      display: flex;
      flex-direction: column;

      .timeline-title {
        font-weight: 400;
        font-size: 30rpx;
        color: #1D2129;
      }

      .timeline-time {
        font-weight: 400;
        font-size: 22rpx;
        color: #86909C;
        margin-top: 16rpx;
      }
    }

    .timeline-line {
      position: absolute;
      left: -28rpx;
      top: 44rpx;
      height: calc(100% - 40rpx);
      border: 1rpx dashed #86909C;
    }
  }
}

.btn-section {
  padding: 0 64rpx;

  .btn-detail {
    height: 88rpx;
    line-height: 88rpx;
    text-align: center;
    background: #FFFFFF;
    border-radius: 60rpx 60rpx 60rpx 60rpx;
    border: 1rpx solid #333335;
    font-weight: 500;
    font-size: 32rpx;
    color: #1D2129;
    text-align: center;
  }
}
</style>