<template>
	<view class="info-card">
		<view class="card-body">
			<view class="info-row" v-for="(item,index) in orderDetail" :key="index">
				<text class="info-label">{{ item.feeName }}：</text>
				<text class="info-value price">￥{{item.rateAmount}}</text>
			</view>
		</view>
	</view>

</template>

<script setup>
	import {
		ref,
		computed,
		defineProps
	} from 'vue'
	import { onShow } from '@dcloudio/uni-app'

	const props = defineProps({
		isGrab: {
			type: Boolean,
			default: false
		},
		orderDetail: {
			type: Object,
			default: () => ([])
		}
	})

	// 计算属性 - 佣金单位
	const commissionUnit = ref('元')
	const percent = ref('5')
	
	// formData.commissionType === '0' ? '%' : '元'
	const commission = computed(() => {
		return ''
	})
	
	// onShow(()=>{
	// 	platformPercent()
	// })
	
	const platformPercent = ()=>{
		getPlatformPerentApi().then(res=>{
			if(res.code == 200){
				percent.value = res.data.platformShopCommissionPercent
			}
		})
	}
</script>

<style scoped lang="scss">
	.info-card {
		background-color: #ffffff;
		border-radius: 16rpx;
		overflow: hidden;
		padding: 20rpx;
		margin-bottom: 20rpx;
	}

	.info-row {
		height: 44rpx;
		line-height: 44rpx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-top: 16rpx;

		&:last-child {
			border-bottom: none;
		}

		.info-label {
			font-size: 28rpx;
			color: #666666;
		}

		.info-value {
			font-size: 28rpx;
			color: #333;

			&.price {
				color: #FD5F3C;
				font-weight: bold;
			}
		}
	}
</style>