<template>
	<view class="error-warp">
		<!-- 返回+标题 -->
		<view class="top-box">
			<view class="nav-box">
				<image class="btnback" :src="$baseUrl + 'sign-up/backBtn.png'" mode="aspectFit"
					@click="handleGoBack" />
				<view class="page_title"></view>
			</view>
		</view>
		<view class="error-content">
			<image :src="$baseUrl + 'sign-up/error.png'" />
			<view class="error-text">
				系统繁忙，
				<br />
				请您重新进入页面
			</view>
		</view>
	</view>
</template>

<script setup>
// 返回上一页
const handleGoBack = () => {
	// 检查是否有上一页
	const pages = getCurrentPages()
	if (pages.length > 1) {
		// 有上一页，直接返回上一页（收藏状态已在更新时同步）
		uni.navigateBack({
			delta: 1
		})
	}else {
		// 没有上一页，跳转到活动页面
		uni.redirectTo({
			url: `/subPackages/momclub/actList`
		})
	}
}
</script>

<style lang="less" scoped>
.error-warp {
	height: 100vh;
	.top-box {
		width: 100%;
		height: 177rpx;
		position: fixed;
		z-index: 999;
	
		.nav-box {
			width: 100%;
			position: fixed;
			top: 100rpx;
			left: 30rpx;
			display: flex;
			align-items: center;
	
			// 返回按钮样式
			.btnback {
				width: 20rpx;
				height: 34rpx;
			}
	
			.page_title {
				width: calc(100% - 190rpx);
				font-size: 32rpx;
				font-weight: 500;
				text-align: center;
				color: #1d1e25;
				line-height: 60rpx;
			}
		}
	}
	.error-content{
		height: 100%;
		background: linear-gradient(180deg, #F4E0B2 0%, #FFFFFF 100%);
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		image {
			width: 320rpx;
			height: 320rpx;
		}
		
		.error-text {
			margin-top: 30rpx;
			font-weight: 600;
			font-size: 28rpx;
			text-align: center;
			color: #54390D;
		}
	}
}
</style>
