dingdanxiangqing.vue 1.7 KB
<template>
	<view class="box">
		<view class="dingdanlist">
			<view class="dingdanitem">
				<view class="ditemleft">订单编号</view>
				<view class="ditemright">{{orderdetail.order_sn}}</view>
			</view>
			<view class="dingdanitem">
				<view class="ditemleft">订单日期</view>
				<view class="ditemright">{{orderdetail.createtime}}</view>
			</view>
			<view class="dingdanitem">
				<view class="ditemleft">商品名称</view>
				<view class="ditemright">{{orderdetail.name}}</view>
			</view>
			<view class="dingdanitem">
				<view class="ditemleft">商品金额</view>
				<view class="ditemright goodmoney">{{orderdetail.pay_money}}元</view>
			</view>

		</view>
	</view>
</template>

<script>
	import app from "../../App.vue"
	export default {
		data() {
			return {
				id: "",
				orderdetail:'',
				type:''
			}
		},
		methods: {
			getorderdetail() {
				let param={
					id:this.id,
					// type:this.type
				}
				app.post("api/person/orderDetail", param, 'get')
					.then(res => {
						console.log(res,"查询的订单信息");
						this.orderdetail = res;
					})
					.catch(err => {});
			}
		},
		mounted() {
			this.getorderdetail()
		},
		onLoad(options) {
			console.log(options)
			this.id = options.id,
			this.type=options.type
		}
	}
</script>

<style>
	.dingdanlist {
		padding: 0 32rpx;
		box-sizing: border-box;
		background: #fff;
	}

	.dingdanitem {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 48rpx 0;
		box-sizing: border-box;
		border-bottom: 1rpx solid #f5f5f5;
	}

	.ditemleft {
		color: #0A0808;
		font-size: 30rpx;
	}

	.ditemright {
		color: #7F8389;
		font-size: 28rpx;
	}

	.goodmoney {
		color: #F29600;
		font-size: 28rpx;
	}
</style>