<template>
	<view class="">
		<nav-bar title="提交完成" goBack />
		<view class="success-content">
			<image class="success-img" src="./static/submit-success.png" mode="aspectFit"></image>
			<view class="success-hint">
				任务提交完成，审核员正在火速赶来的路上~
			</view>
			<view class="continue-btn" @click.stop="onContinue()">
				继续完成其他任务
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {}
		},
		methods: {
			onContinue() {
				try {
					const pages = getCurrentPages();
					const route = pages[pages.length - 3].route;
					if (route && ['pages/task/my-task', 'pages/task/task-details', 'pages/task/task-audit',
							'pages/task/task-list'
						].includes(
							route)) {
						const $vm_ = pages[pages.length - 3].$vm
						$vm_.init();
						uni.navigateBack({
							delta: 2
						});
						return false
					}
				} catch (err) {
					console.log('err  === ', err)

				}
				uni.reLaunch({
					url: '/pages/task/my-task'
				})

			}
		}
	}
</script>

<style lang="scss" scoped>
	.success-content {
		padding: 262rpx 30rpx 0;
		display: flex;
		flex-direction: column;
		align-items: center;

		.success-img {
			width: 526rpx;
			height: 267rpx;
		}

		.success-hint {
			padding: 50rpx 0 40rpx;
			font-size: 28rpx;
			// font-family: .PingFang SC, .PingFang SC-Light;
			font-weight: Light;
			color: #1a1a1a;
		}

		.continue-btn {
			width: 690rpx;
			height: 80rpx;
			background: linear-gradient(92deg, #3cb7d2 2%, #44c5d5 98%);
			border-radius: 40rpx;
			font-size: 32rpx;
			font-family: PingFang SC, PingFang SC-Regular;
			font-weight: Regular;
			text-align: center;
			color: #ffffff;
			line-height: 80rpx;
		}
	}
</style>