<template>
	<view class="content">
		<text class="success-icon iconfont iconroundcheck"></text>
		<text class="tit">{{ type == 1? '抢购成功' : '支付成功'}}</text>
		<view class="btn-group">
			<navigator v-if="type == '1' " :url="'/pages/order/order'" open-type="redirect" class="mix-btn">查看订单</navigator>
			<navigator v-else :url="'/pages/order/orderDetail?id='+orderId" open-type="redirect" class="mix-btn">查看订单</navigator>
			<navigator v-if="type == '1' " :url="'/pages/hall/hallinfo?id=' + id + '&name=' + name + '&peoplename=' + peoplename" open-type="redirect" class="mix-btn hollow">返回抢画列表</navigator> 
			<navigator v-else url="/pages/index/index" open-type="switchTab" class="mix-btn hollow">返回首页</navigator>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				orderId:'',
				type:'',
				id:'',
				name:'',
				peoplename:'',
			}
		},
		onLoad(opt) {
			if(opt.type) {
				this.type = opt.type
			}
			if(opt.uid) {
				this.id = opt.uid
			}
			if(opt.name) {
				this.name = opt.name
			}
			if(opt.peoplename) {
				this.peoplename = opt.peoplename
			}
			// 保存订单号
			this.orderId = opt.orderid;
		},
		methods: {
			
		}
	}
</script>

<style lang='scss'>
	.content{
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}
	.success-icon{
		font-size: 160upx;
		color: #d13737;
		margin-top: 100upx;
	}
	.tit{
		font-size: 38upx;
		color: #303133;
	}
	.btn-group{
		padding-top: 100upx;
	}
	.mix-btn {
		margin-top: 30upx;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 600upx;
		height: 80upx;
		font-size: $font-lg;
		color: #fff;
		background-color: $base-color;
		border-radius: 10upx;
		&.hollow{
			background: #fff;
			color: #303133;
			border: 1px solid #ccc;
		}
	}
</style>
