<template>
	<view class="pages-box">
		<uv-navbar autoBack title="订单详情" placeholder />
		<OrderStatus />
		<view class="divide" />

		<view class="shipping-address">
			<text class="iconfont icon">&#xe990;</text>
			<view class="text">
				<view>弄玉 152****1234</view>
				<view>浙江金华市婺城区秋滨街道智慧创业园123室</view>
			</view>
			<text class="iconfont more">&#xe671;</text>
		</view>


		<view class="divide" />
		<!-- 商品信息 -->
		<OrderGoods />
		<view class="divide" />
		<!-- 订单金额信息 -->
		<OrderPrice :order-status="2" />
		<view class="divide" />
		<!-- 订单信息 -->
		<OrderInfo />

		<view class="footer-box">
			<view class="footer-divide" />
			<view class="footer-btns">
				<view class="footer-btn cancel-bth">
					取消订单
				</view>
				<view class="footer-btn confirm-btn" @click.stop="handleOrderPay()">
					立即付款
				</view>
			</view>
		</view>


	</view>


</template>

<script lang="ts" setup>
	import { ref } from "vue";
	import OrderStatus from "./components/OrderStatus.vue";
	import OrderGoods from "./components/OrderGoods.vue";
	import OrderPrice from "./components/OrderPrice.vue";
	import OrderInfo from "./components/OrderInfo.vue";

	const tabList = [
		{
			lable: '快递配送',
			value: 'dispatching'
		},
		{
			lable: '上门自提',
			value: 'willCall'
		}
	]
	const currentTab = ref<'dispatching' | 'willCall'>('dispatching');
	
	
	// 订单支付
	const handleOrderPay = () => {
		uni.navigateTo({
			url:"/pages/order/OrderPay"
		})
	}
</script>

<style scoped lang="scss">
	.pages-box {
		min-height: 100vh;
		background-color: $my-pages-bg;
	}

	.divide {
		width: 100%;
		height: 30rpx;
	}


	.shipping-address {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 28rpx 30rpx 40rpx;
		box-sizing: border-box;
		background-color: #fff;

		.icon {
			flex-shrink: 0;
			font-size: 40rpx;
			color: red;
		}

		.more {
			flex-shrink: 0;
		}

		.text {
			padding: 0 25rpx;
			flex: 1;
			overflow: hidden;
		}
	}

	.footer-box {
		.footer-divide {
			width: 100%;
			height: 160rpx;
		}

		.footer-btns {
			position: fixed;
			left: 0;
			right: 0;
			bottom: 0;
			z-index: 1;
			width: 100%;
			height: 130rpx;
			background: #ffffff;
			display: flex;
			align-items: center;
			justify-content: flex-end;
			padding: 0 23rpx;
			box-sizing: border-box;

			.footer-btn {
				width: 192rpx;
				height: 76rpx;
				border-radius: 10rpx;
				font-size: 28rpx;
				font-family: PingFang SC, PingFang SC-Bold;
				font-weight: 700;
				text-align: center;
				line-height: 76rpx;
			}

			.cancel-bth {
				border: 1rpx solid #cccccc;
				color: #808080;
			}

			.confirm-btn {
				margin-left: 30rpx;
				background: #e93534;
				color: #ffffff;
			}
		}
	}
</style>