<template>
	<view class="order-detail1-log" v-if="list.length">
		<view class="item" v-for="(item, index) in list" :key="index">
			<view class="message">{{ item.log_text }}</view>
			<view class="time">
				<text>{{ item.log_name }}</text>
				<text>{{ item.created_at }}</text>
			</view>
		</view>
	</view>
	<view class="nomore" v-else>暂无操作日志</view>
</template>

<script>
	import { _API_OrderLog } from '@/apis/order.js'
	export default {
		data() {
			return {
				list: []
			};
		},
		onLoad({ order_num }) {
			uni.loading()
			_API_OrderLog({ order_num }).then(({ data: { list } }) => {
				this.list = list
			})
		}
	}
</script>

<style lang="scss" scoped>
	.nomore {
		height: 100vh;
		@include flex();
		background: $app-base-bg;
	}
	.order-detail1-log {
		height: 100vh;
		overflow: auto;
		background: $app-base-bg;
		.item {
			margin-bottom: 10rpx;
			.message {
				padding: 10rpx 30rpx;
				font-size: 32rpx;
				font-weight: bold;
				margin-bottom: 2rpx;
				background: #FFFFFF;
			}
			.time {
				@include flex();
				box-sizing: border-box;
				padding: 0 30rpx;
				height: 78rpx;
				justify-content: space-between;
				background: #FFFFFF;
			}
		}
	}
</style>
