<template>
<view class="box">
   <view class="imgBox">
	   <image class="duihao" src="../../static/img/icon_selectY.png" mode=""></image>
   </view>
   <view class="txt" v-if="type==1">下单成功</view>
   <view class="txt" v-if="type==2">付款失败</view>
   <view class="goBack" @click="goBack">返回首页</view>
 
</view>
</template>

<script>
	export default {
		components: {
			
		},
		
		data() {
			return {
				type:'',
			}
		},
		onLoad(opt) {
			this.type=opt.type
			if(this.type==2){
				uni.setNavigationBarTitle({
				    title: '下单失败' //页面标题为"新标题"
				});
			}
			
		},
		onShow() {
			
		},
		methods: {
			goBack(){
				uni.switchTab({
					url:'/pages/index/index'
				})
			}
		
			
			
			
			
		}
	}
</script>

<style scoped lang="less">
.box {
	width: 100vw;
	min-height: 100vh;
	background: #F4F4F4;
}
.duihao{
	width: 110rpx;height: 110rpx;
}
.imgBox{
	text-align: center;padding-top: 190rpx;
}
.txt{
		text-align: center;padding-top: 30rpx;
		font-weight: 500;
		font-size: 36rpx;
		color: #222222;
		line-height: 50rpx;
}
.goBack{
	font-weight: 400;
	font-size: 26rpx;
	color: #F03B3B;
	line-height: 37rpx;
	text-align: center;
	padding-top: 30rpx;
}
</style>
