<template>
	<view class="success-container">
		<image mode="aspectFit" src="/static/images/icon/retail/paySuccess.png"></image>
		<view>支付成功</view>
		<button hover-class="hover-active" @click="review()">查看订单详情</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		onLoad() {
			uni.setStorage({ key: "paySuccess", data: "true", success: () => {}, fail: () => {} });
		},
		methods: {
			review() {
				// 删除收款出库状态
				uni.removeStorage({ key: 'retailStatus', success: () => {} });
				uni.removeStorage({ key: 'paySuccess', success: () => {} });
				uni.reLaunch({ url: `/pages/order_list/order_list?order_type=19` });
			}
		}
	}
</script>

<style lang="scss">
	@import '~style/public.scss';
	.success-container {
		@include centerFlex(flex-start);
		flex-direction: column;
		width: 100vw;
		height: 100vh;
		padding-bottom: 0rpx;
		padding-bottom: calc( 0rpx + constant(safe-area-inset-bottom)); /* 兼容 iOS < 11.2 */
		padding-bottom: calc( 0rpx + env(safe-area-inset-bottom)); /* 兼容 iOS >= 11.2 */
		font-size: 32rpx;
		
		>image {
			width: 132rpx;
			height: 132rpx;
			margin-top: 60rpx;
		}
		>view {
			font-weight: 500;
			margin-top: 30rpx;
			margin-bottom: 102rpx;
		}
		> button {
			color: #009874;
			border: 2rpx solid #009874;
			border-radius: 44rpx;
		}
	}
</style>
