guhongwei vor 2 Jahren
Ursprung
Commit
513c61e937
2 geänderte Dateien mit 98 neuen und 3 gelöschten Zeilen
  1. 2 0
      pages/store/index.vue
  2. 96 3
      pagesMy/logistics/index.vue

+ 2 - 0
pages/store/index.vue

@@ -118,6 +118,8 @@
 				console.log(e);
 			},
 			toPath(e) {
+				const that = this;
+				that.clearPage();
 				if (e && e.route && e.type == '0') {
 					uni.redirectTo({
 						url: `/${e.route}`

+ 96 - 3
pagesMy/logistics/index.vue

@@ -2,10 +2,39 @@
 	<mobile-frame>
 		<view class="main">
 			<view class="one">
-				地图
+				地图轨迹
 			</view>
 			<view class="two">
-				代付
+				<view class="two_1">
+					<view class="two_1_1">
+						<text>订单状态:</text>
+						<text>{{info.status}}</text>
+					</view>
+					<view class="two_1_1">
+						<text>订单号:</text>
+						<text>{{info.no}}</text>
+					</view>
+					<view class="two_1_1">
+						<text>收货地址:</text>
+						<text>{{info.address.province}}{{info.address.city}}{{info.address.area}}{{info.address.address}}</text>
+					</view>
+					<view class="two_1_1">
+						<text>下单时间:</text>
+						<text>{{info.buy_time}}</text>
+					</view>
+				</view>
+				<view class="two_2">
+					<view class="txt">
+						<text>物流记录</text>
+					</view>
+					<view class="info">
+						<view v-for="(item,index) in list" :key="index">
+							<view class="name">
+								{{item.name}}
+							</view>
+						</view>
+					</view>
+				</view>
 			</view>
 		</view>
 	</mobile-frame>
@@ -17,7 +46,8 @@
 			return {
 				id: '',
 				user: {},
-				info: {}
+				info: {},
+				list: []
 			};
 		},
 		onLoad: function(e) {
@@ -44,6 +74,7 @@
 					let res = await that.$api(`/orderDetail/${that.id}`, 'GET')
 					if (res.errcode == '0') {
 						that.$set(that, `info`, res.data);
+						that.search();
 					} else {
 						uni.showToast({
 							title: res.errmsg,
@@ -51,11 +82,73 @@
 						})
 					}
 				}
+			},
+			async search() {
+				const that = this;
+				let res = await that.$api(`/orderDetail/sot/${that.info._id}`);
+				if (res.errcode == '0') {
+					console.log(res);
+				} else {
+					console.log(res.data);
+					uni.showToast({
+						title: res.data.message,
+						icon: 'none'
+					})
+				}
 			}
 		}
 	}
 </script>
 
 <style lang="scss">
+	.main {
+		display: flex;
+		flex-direction: column;
+		width: 100vw;
+		height: 100vh;
+
+		.one {
+			position: relative;
+			width: 100vw;
+			height: 100vh;
+			background-color: #ff0000;
+		}
+
+		.two {
+			position: absolute;
+			bottom: 0;
+			width: 92vw;
+			height: 60vh;
+			overflow-y: auto;
+			background: #fff;
+			margin: 0 2vw;
+			border-top-left-radius: 5px;
+			border-top-right-radius: 5px;
+			padding: 2vw;
+
+			.two_1 {
+				margin: 0 0 2vw 0;
+
+				.two_1_1 {
+					padding: 2vw 0;
+				}
+			}
 
+			.two_2 {
+				.txt {
+					margin: 0 0 2vw 0;
+
+					text {
+						background-color: #ff0000;
+						color: #fff;
+						border-radius: 5px;
+						padding: 1vw;
+
+					}
+				}
+			}
+
+		}
+
+	}
 </style>