<template>
	<view class="content">
		<view class="flex">
			<text>配送方式:</text>
			<text>{{goodList.expressType}}</text>
		</view>
		<view class="flex">
			<text>订单备注:</text>
			<text>{{goodList.comment?goodList.comment:'无'}}</text>
		</view>
		<view class="flex">
			<view style="display: flex;align-items: center;" @click="show=!show">
				<text>订单编号:</text>
				<up-icon name="arrow-down" color="#999999" size="20"></up-icon>
			</view>
			<text>{{goodList.id}}</text>
		</view>
		<view>
			<up-transition :show="show">
				<view class="flex">
					<text>缺货时处理方式:</text>
					<text>{{goodList.actionOnOOI}}</text>
				</view>
				<view class="flex">
					<text>蚕宝豆:</text>
					<text>获得{{goodList.getPoints}}蚕宝豆</text>
				</view>
				<!-- <view class="flex">
					<text>等级成长值:</text>
					<text>获得{{goodList.getExperience}}点积分</text>
				</view> -->
				<view class="flex">
					<text>微信转账单号:</text>
					<text>202406112456325461</text>
				</view>
				<view class="flex">
					<text>创建时间:</text>
					<uni-dateformat :date="goodList.submitTime" format="yyyy-MM-dd hh:mm:ss"></uni-dateformat>
				</view>
			</up-transition>
		</view>
	</view>
</template>

<script setup lang="ts">
	import { onShow } from '@dcloudio/uni-app';
	import { ref } from 'vue'
	const show = ref(false)
	const goodList = ref({})

	onShow(() => {
		goodList.value = JSON.parse(uni.getStorageSync('orderGoods'))
	})
</script>

<style lang="less" scoped>
	.flex {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 10rpx 20rpx;

		.text1 {
			color: red;
		}
	}

	.h2 {
		font-size: 34rpx;
		font-weight: bold;
		color: #000000;
		padding: 10rpx 20rpx;
	}

	.content {
		margin-top: 20rpx;
		color: #999999;
	}
</style>