<template>
	<div></div>
</template>

<script>
export default {
	data() {
		return {
			hasJumped: false,
		}
	},
	onShow() {
		if (this.hasJumped) return;

		this.$store.dispatch('GetInfo')
			.then(() => {
				uni.switchTab({
					url: '/pages/scan/scan',
					success: () => {
						this.hasJumped = true;
					},
					fail: (err) => {
						console.error('跳转失败:', err);
					}
				});
			})
			.catch(() => {
				uni.reLaunch({ url: '/pages/login' })
			});
	}
}
</script>

<style scoped lang="scss">
/* 样式保持不变 */
.production-page {
	min-height: 100vh;
	background: #f6f6f6;
}

.page-header {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40rpx 30rpx 20rpx;
	background: #fff;
	border-bottom: 1rpx solid #e8e8e8;
	
	.header-title {
		font-size: 28rpx;
		font-weight: 500;
		color: #333;
		letter-spacing: 2rpx;
		padding: 0 30rpx;
	}
	
	.header-line {
		height: 2rpx;
		background: linear-gradient(90deg, transparent, #ddd, transparent);
		flex: 1;
		max-width: 100rpx;
		
		&.line-left {
			background: linear-gradient(90deg, transparent, #ddd);
		}
		
		&.line-right {
			background: linear-gradient(90deg, #ddd, transparent);
		}
	}
}

.line-header {
	background: #fff;
}

.content-wrapper {
	padding: 0;
}
</style>