<!-- c:\Users\zhu\Desktop\Practice Project\new-88live\pages\user\money\google-pay-success.vue -->
<!-- 支付成功页 -->
<template>
  <view class="google-pay-success">
    <!-- 顶部确认区域 -->
    <view class="success-header">
      <view class="back-button" @tap="goBack">
        <text class="wlIcon-fanhui1"></text>
      </view>
      <view class="success-icon-wrapper">
        <text class="success-checkmark">✓</text>
      </view>
      <text class="success-title">Thanks!</text>
    </view>

    <!-- 支付详情区域 -->
    <view class="success-content">
      <text class="success-message">Your order was successfully processed</text>
      <text class="success-email">Check your email for your receipt.</text>
    </view>

    <!-- 底部按钮 -->
    <view class="success-footer">
      <button class="continue-button" @tap="continueShopping">Continue Shopping</button>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      paymentType: '',
      accountInfo: '',
      order_type: ''
    }
  },
  onLoad(options) {
    if (options.paymentType) {
      this.paymentType = decodeURIComponent(options.paymentType)
    }
    if (options.accountInfo) {
      this.accountInfo = decodeURIComponent(options.accountInfo)
    }
    if (options.order_type) {
      this.order_type = options.order_type
    }
  },
  methods: {
    goBack() {
      uni.navigateBack({ delta: 1 })
    },
    continueShopping() {
      uni.switchTab({ url: '/pages/newhome' })
    }
  }
}
</script>

<style>
page {
  background-color: #f5f5f5;
}

.google-pay-success {
  min-height: 100vh;
  background-color: #f5f5f5;
  display: flex;
  flex-direction: column;
}

/* 顶部确认区域 */
.success-header {
  background: linear-gradient(135deg, #FF6B9D 0%, #FF8FA3 100%);
  padding: 120rpx 0 80rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* 返回按钮 */
.back-button {
  position: absolute;
  top: calc(var(--status-bar-height) + 20rpx);
  left: 30rpx;
  width: 64rpx;
  height: 64rpx;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.back-button text {
  font-size: 36rpx;
  color: #FFFFFF;
}

.success-icon-wrapper {
  width: 160rpx;
  height: 160rpx;
  background-color: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 40rpx;
}

.success-checkmark {
  font-size: 120rpx;
  color: #FFFFFF;
  font-weight: bold;
  line-height: 1;
}

.success-title {
  font-size: 64rpx;
  color: #FFFFFF;
  font-weight: 600;
  letter-spacing: 2rpx;
}

/* 支付详情区域 */
.success-content {
  background-color: #FFFFFF;
  padding: 60rpx 40rpx;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
}

.success-message {
  font-size: 32rpx;
  color: #333333;
  text-align: center;
  margin-bottom: 20rpx;
  line-height: 1.6;
}

.success-email {
  font-size: 28rpx;
  color: #999999;
  text-align: center;
  line-height: 1.6;
}

/* 底部按钮 */
.success-footer {
  padding: 40rpx 30rpx;
  background-color: #FFFFFF;
  padding-bottom: calc(40rpx + env(safe-area-inset-bottom));
}

.continue-button {
  width: 100%;
  height: 88rpx;
  background: linear-gradient(135deg, #FF6B9D 0%, #FF8FA3 100%);
  color: #FFFFFF;
  font-size: 32rpx;
  font-weight: 500;
  border-radius: 12rpx;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.continue-button::after {
  border: none;
}

.continue-button:active {
  opacity: 0.9;
}
</style>