<template>
	<view class="container">
		<view class="top-box">
			<img class="img" src="@/static/mine/icon_mine_success.png" alt="" />
			<p class="top-text">提交成功</p>
		</view>

		<view class="content-box">
			<view class="content-item">
				<view class="item-l">店铺名称</view>
				<view class="item-r">{{ listInfo.storeName }}</view>
			</view>
			<view class="content-item">
				<view class="item-l">法人名称</view>
				<view class="item-r">{{ listInfo.legalRepresentativeName }}</view>
			</view>
			<view class="content-item">
				<view class="item-l">详情地址</view>
				<view class="item-r">{{ listInfo.storeAddressDetail }}</view>
			</view>
		</view>

		<button class="btn" @click="handlerBackHome">返回首页</button>
		<button class="btn" @click="handlerViewDetail">查看详情</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				listInfo: {},
			};
		},
		onShow() {
			let legalInfo = this.$store.state.data.legalInfo;
			let storeInfo = this.$store.state.data.storeInfo;
			let aptitudeInfo = this.$store.state.data.aptitudeInfo;

			this.listInfo = Object.assign({}, {
				...legalInfo,
				...storeInfo,
				...aptitudeInfo,
			}, );
			console.log(this.listInfo);
		},
		methods: {
			// 点击跳转到开店详情页面
			handlerViewDetail() {
				uni.redirectTo({
					url: '/pageMerchant/mineModule/certification/openStoreAppealDetail',
				});
			},
			// 点击跳转到首页
			handlerBackHome() {
				// uni.redirectTo({
				// 	url: '/pageMerchant/tabbar/mine',

				// });
				uni.switchTab({
					url: '/pages/tabbar/home'
				});
			}
		},
	};
</script>

<style lang="scss" scoped>
	.container {
		.top-box {
			text-align: center;
			margin-top: 100rpx;

			.img {
				width: 200rpx;
				height: 200rpx;
			}

			.top-text {
				font-size: 40rpx;
				font-weight: bold;
				margin-top: 20rpx;
			}
		}

		.content-box {
			margin: 200rpx auto 50rpx;
			width: 80%;
			border-top: 2rpx solid #f3f3f3;
			border-bottom: 2rpx solid #f3f3f3;
			padding: 20rpx;

			.content-item {
				display: flex;
				justify-content: space-between;
				margin: 20rpx 0;
				font-size: 28rpx;

				.item-l {
					color: #000;
				}

				.item-r {
					color: #9a9a9a;
				}
			}
		}

		.btn {
			background-color: #5992bb !important;
			color: #fff;
			font-size: 32rpx;
			border-radius: 40rpx;
			margin-top: 100rpx;
			margin-bottom: 100rpx;
			width: 90%;
		}
	}
</style>
s