
<template>
	<view class="info-content">
		<view class="block">
			<view class="block-item">
				<view class="block-item-flex" v-for="(item, index) in objArr" :key="index">
					<label>{{item.name}}</label>
					<view class="val">{{item.value}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import { unifyInfo } from '@/apis/interfaces/order.js'
	export default {
		data() {
			return {
				objArr: []
			};
		},
		created() {
			uni.showLoading({
				title: '加载中...',
				mask : true
			})
			unifyInfo({
				order_type	: this.$Route.query.orderType.replace(/\-/g, '\\'),
				order_id	: this.$Route.query.id
			}).then(res => {
				uni.hideLoading()
				this.objArr = res;
			}).catch(err => {
				uni.showToast({
					title: err.message,
					icon : 'none'
				})
			})
		}
	}
</script>
<style lang="scss" scoped>
	.info-content{ 
		position: relative;
		background: #eeefff;
		min-height: 100vh;
		box-sizing: border-box;
		padding-bottom: 10rpx;
		padding-top: 30rpx;
		&::before{
			background-image: linear-gradient(180deg, #353ef4 10%, #eeefff);
			height: 50vh;
			content: " ";
			width: 100vw;
			position: absolute;
			top: 0;
			left: 0;
		}
		// 模块
		.block{
			background: white;
			position: relative;
			z-index: 1;
			margin: 0 40rpx 30rpx;
			border-radius: 20rpx;
			.block-header{
				padding: 32rpx;
				display: flex;
				justify-content: space-between;
				align-items: center;
				.title{
					width: calc(100% - 200rpx);
					text{
						font-size: 30rpx;
						line-height: 30rpx;
						color: gray;
					}
					view{
						font-weight: bold;
						font-size: 40rpx;
						line-height: 50rpx;
						@extend .nowrap;
					}
				}
				.price{
					text-align: right;
					width: 200rpx;
					padding-left: 20rpx;
					text{
						font-size: 30rpx;
						line-height: 30rpx;
						color: gray;
					}
					view{
						font-weight: bold;
						font-size: 40rpx;
						color: #353ef4;
						line-height: 50rpx;
						@extend .nowrap;
					}
				}
			}
			.block-item{
				padding: 32rpx;
				.block-item-flex{ 
					padding: 20rpx 0;
					font-size: 30rpx;
					display: flex;
					color: #555;
					justify-content: space-between;
					label{ width: 240rpx; }
					.val{
						text-align: right;
						width: calc(100% - 240rpx);
					}
				}
			}
		}
	}
</style>

