<template>
	<view class="exchangeDetail">
		<!-- 兑换状态 -->
		<view class="detailCard">
			<image src="/static/icon/success.png"></image>
			<text>奖品兑换成功</text>
		</view>
		<!-- 按钮 -->
		<view class="btn">
			<view class="back" @click="goBack">
				<text>返回首页</text>
			</view>
			<view class="checkout" @click="goOrderDetail">
				<text>查看订单</text>
			</view>
		</view>
		<!-- 加入会员 -->
		<view class="bottomCard" @click="goOther">
			<image src="/static/icon/Kudosbg.png"></image>
			<view class="content">
				<text>立即加入IHG会员</text>
				<image src="/static/icon/right.png"></image>
			</view>
		</view>

	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},

		methods: {
			// 返回首页
			goBack() {
				uni.reLaunch({
					url: '/pages/my/my'
				})
			},
			// 跳转订单详情
			goOrderDetail() {
				uni.navigateTo({
					url: '/pages/my/myorders/orders'
				})
			},
			// 跳转其他小程序
			goOther() {
				wx.navigateToMiniProgram({
					appId: 'wx255b58f0992b3c53', //appid
					path: 'newUIMain/enrollment/enrollment', //path
					extraData: { //参数
						foo: 'bar'
					},
					// envVersion: 'develop', //开发版develop 开发版 trial   体验版 release 正式版 
					success(res) {
						console.log('成功')
						// 打开成功
					},
					fail(e) {
						console.log(e, '失败')
					}
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	$pageColor:#F9F9F9;
	$bgColor:#FFFFFF;

	@mixin flexlayout {
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.exchangeDetail {
		height: 100%;
		background: $pageColor;
	}

	.detailCard {
		width: 750rpx;
		height: 446rpx;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;

		image {
			width: 120rpx;
			height: 120rpx;
			margin-bottom: 48rpx;
		}

		text {
			display: block;
			font-size: 32rpx;
			font-family: PingFangSC-Medium, PingFang SC;
			font-weight: 500;
			color: #080F18;
		}
	}

	.btn {
		width: 750rpx;
		height: 76rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding:0 32rpx;
		.back {
			width: 332rpx;
			height: 76rpx;
			background: #F5F5F5;
			border-radius: 8rpx;

			@include flexlayout() text {
				font-size: 30rpx;
				font-family: PingFang-SC-Bold, PingFang-SC;
				font-weight: bold;
				color: #FF6301;
			}
		}

		.checkout {
			width: 332rpx;
			height: 76rpx;
			background: linear-gradient(270deg, #FF6200 0%, #FF9342 100%);
			border-radius: 8rpx;

			@include flexlayout() text {
				font-size: 30rpx;
				font-family: PingFang-SC-Bold, PingFang-SC;
				font-weight: bold;
				color: #FFFFFF;
			}
		}
	}

	.bottomCard {
		width: 690rpx;
		height: 584rpx;
		background: #FFFFFF;
		box-shadow: 0px 8rpx 16rpx 0px rgba(220, 222, 229, 0.71);
		border-radius: 20rpx;
		background: $bgColor;
		margin-left: 30rpx;
		margin-top: 64rpx;

		image {
			width: 690rpx;
			height: 492rpx;
		}

		.content {
			width: 690rpx;
			height: 92rpx;
			position: relative;
			margin-top:-9rpx;
			border:1rpx solid;
			@include flexlayout();
			image {
				width: 12rpx;
				height: 20rpx; 
				margin-left: 8rpx;
			}
			text {
				font-size: 30rpx;
				font-family: PingFang-SC-Medium, PingFang-SC;
				font-weight: 500;
				color: #333333;
				text-shadow: 0px 8rpx 16rpx rgba(220, 222, 229, 0.71);
			}
		}
	}
</style>
