<!-- 支付成功頁面 -->
<template>
	<view class="success-page">
		<view class="success-icon">
			<text class="wlIcon wlIcon-chenggong1"></text>
		</view>
		<view class="success-text">
			<text class="title">支付成功</text>
			<text class="desc">感謝您的購買，訂單正在處理中</text>
		</view>
		<view class="success-actions">
			<button class="cu-btn bg-gradual-orange round lg" @tap="viewOrder">查看訂單</button>
			<button class="cu-btn line-orange round lg" @tap="goHome">返回首頁</button>
		</view>
	</view>
</template>

<script>
export default {
	data() {
		return {
			order_type: 'goods'
		}
	},
	onLoad(option) {
		if (option.order_type) this.order_type = option.order_type
	},
	methods: {
		viewOrder() {
			uni.navigateTo({ url: '/pages/user/order/order?state=2' })
		},
		goHome() {
			uni.switchTab({ url: '/pages/index/index' })
		}
	}
}
</script>

<style scoped>
.success-page {
	min-height: 100vh;
	background: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 0 60rpx;
}
.success-icon {
	margin-bottom: 40rpx;
}
.success-icon text {
	font-size: 120rpx;
	color: #07c160;
}
.success-text {
	text-align: center;
	margin-bottom: 80rpx;
}
.success-text .title {
	display: block;
	font-size: 40rpx;
	font-weight: bold;
	color: #333;
	margin-bottom: 16rpx;
}
.success-text .desc {
	display: block;
	font-size: 28rpx;
	color: #999;
}
.success-actions {
	display: flex;
	flex-direction: column;
	width: 100%;
	gap: 24rpx;
}
.success-actions .cu-btn {
	width: 100%;
}
</style>