<template>
	<view class="order-success">
		<view class="order-success-main">
			<view class="img">
				<image src="@/static/orderOk.png" mode=""></image>
			</view>
			<view class="main-text">
				<text>下单成功</text>
			</view>
			<view class="main-text2" @click="lookOrder">
				<text class="main-text2-1">查看订单 </text>
				<u-icon name="arrow-right"></u-icon>
			</view>
			<view class="btn">
				<u-button type="primary" text="完成" @click="submit"></u-button>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		onLoad(options) {
			this.id = options.id;
		},
		data() {
			return {
				id: ''
			};
		},
		methods: {
			lookOrder() {
				let id = this.id
				uni.navigateTo({
					url: `/pages/my/myOrderDetail/myOrderDetail?id=${id}&type=1`
				})
			},
			submit() {
				uni.switchTab({
					url: '/pages/goods/goodList/goodList'
				})
			}
		}
	}
</script>

<style lang="scss">
	.order-success {
		background-color: #fff;
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;

		.order-success-main {
			.img {
				width: 100px;
				height: 100px;
				padding: 63.4px 137px 28px 138px;

				image {
					width: 100%;
					height: 100%;
					object-fit: cover;
				}
			}

			.main-text {
				color: #495B7D;
				text-align: center;
				font-size: 26px;
				font-weight: 700;
				margin-bottom: 8px;
			}

			.main-text2 {
				color: #6E7688;
				font-size: 17px;
				font-weight: 500;
				display: flex;
				align-items: center;
				margin-bottom: 307px;

				.main-text2-1 {
					margin-right: 8px;
					padding-left: 146px;
				}
			}
		}
	}

	::v-deep .u-button {
		height: 32px !important;
		width: 163px !important;
	}
</style>