<template>
	<view class="content">
		<view class="item-flex" v-for="(item, index) in params" :key="index">
			<label>{{item.title}}</label>
			<view class="value">{{item.value_text || '-'}}</view>
		</view>
	</view>
</template>

<script>
	import { baseBase } from '@/apis/interfaces/order.js'
	export default {
		data() {
			return {
				params: []
			};
		},
		created() {
			uni.showLoading({
				title: '加载中...',
				mask : true
			})
			baseBase(this.$Route.query.itemId).then(res => {
				let { params } = res;
				
				console.log(params)
				
				this.params = params
				uni.hideLoading()
			}).catch(err => {
				uni.showToast({
					title: err.message,
					icon : 'none'
				})
			})
		}
	}
</script>

<style lang="scss">
	.content{
		padding: 30rpx 0;
	}
	.item-flex{
		display: flex;
		justify-content: space-between;
		padding: 30rpx;
		position: relative;
		line-height: 40rpx;
		align-items: center;
		background: white;
		label{
			width: 300rpx;
			font-size: 30rpx;
			color: gray;
			@extend .nowrap;
		}
		.value{
			text-align: right;
			width: calc( 100% - 300rpx );
			font-size: 30rpx;
		}
		@extend .border-solid;
		&::after{
			left: 30rpx;
		}
		&:last-child::after{
			display: none;
		}
	}
</style>
