<template>
	<!-- 失败模态框 -->
	<view class="fail" >
		<view>
			<image class="failimg" src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/fail.png" mode=""></image>
			<view class="fail-content">
				<text class="fail-content-text">签到失败!</text>
				<button class="fail-content-btn" @click="returnback" type="default">返回</button>
			</view>
		</view>
	</view>
</template>

<script>
	export default{
		methods:{
			returnback(){
				let canBack = true;
				const pages = getCurrentPages();
				if(pages.length > 1){
					uni.navigateBack(1);
					return;
				}
				let a = this.$router.go(-1);
				if(a==undefined){
					uni.reLaunch({
						url:'/pages/index/index'
					})
				}
				return;
				uni.navigateBack(1)
			}
		}
	}
	
</script>

<style scoped>
	.fail{
		width: 100%;
		height: 100%;
		background-color: rgba(45,45,45,.8);
		display: flex;
		justify-content: space-between;
		align-items: center;
		position: fixed;
		/* padding-top: 80rpx; */
		padding-left: 125rpx;
		/* padding: 250rpx 100rpx 566rpx 110rpx; */
	}
	.failimg{
		width: 500rpx;
		height: 300rpx;
		z-index: 2000;
		margin-bottom: -12px;
	}
	
	.fail-content{
		width: 500rpx;
		height: 400rpx;
		background-color: #fff;
		border-bottom-left-radius: 10px;  /* 左下角 */
		border-bottom-right-radius: 10px; /* 右下角 */
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	.fail-content-text{
		font-weight: bold;
		font-size: 26px;
	}
	.fail-content-btn{
		list-style: none;
		width: 350rpx;
		height: 40px;
		line-height: 40px;
		background-color: #4C50E7;
		text-align: center;
		color: #fff;
		font-size: 12px;
		border-radius: 30px;
		margin: 20rpx;
	}
</style>
