<template>
	<view class="express-detail">
		<view>物流公司：{{ express_name }}</view>
		<UniSteps :options="info.data" direction="column" active-color="#F76454"></UniSteps>
	</view>
</template>

<script>
	import UniSteps from '@/components/uni-steps/uni-steps.vue'
	export default {
		components: { UniSteps },
		data() {
			return {
				info: {},
				express_name: ''
			};
		},
		onLoad({ express_order, express_name }) {
			this.express_name = express_name
			uni.loading()
			uni.request({ url: `https://www.yinchengnuo.com/express?num=${express_order}` }).then(([, { data }]) => {
				this.info = data
				this.info.data.forEach(e => {
					e.title = e.context
					e.desc = e.time
				})
				uni.hideLoading()
			})
		}
	}
</script>

<style lang="scss">
	.express-detail {
		width: 100vw;
		height: 100vh;
		overflow: auto;
		padding: 24rpx;
		background: #FFFFFF;
		box-sizing: border-box;
	}
</style>
