Quellcode durchsuchen

fix:订单管理

韦祥的电脑\Administrator vor 10 Monaten
Ursprung
Commit
ec4501511b
2 geänderte Dateien mit 18 neuen und 5 gelöschten Zeilen
  1. 14 5
      pagesMy/orderList/orderList.vue
  2. 4 0
      pagesMy/stayInfo/roomPosition.vue

+ 14 - 5
pagesMy/orderList/orderList.vue

@@ -10,10 +10,9 @@
 			</view>
 		</view>
 		<view class="mainContain">
-			<view class="card" v-for="item,index  in dataList" :key="index">
+			<view v-if="dataList.length>0" class="card" v-for="item,index  in dataList" :key="index">
 				<view class="header">
 					<span style="font-weight: 700;">订单号:{{item.orderCode}}</span>
-
 					<text v-if='item.orderStatus==-1&&item.status==1' class="orange">待确认</text>
 					<text v-else-if='item.status==0&&item.orderStatus==-1' class="red">待支付</text>
 					<text v-else-if='item.orderStatus==1&&item.status==1' class="green">已预订</text>
@@ -62,16 +61,20 @@
 					</view>
 				</view> -->
 			</view>
+			<view class="nodata" v-if='dataList.length==0'>
+				<NoData></NoData>
+			</view>
 		</view>
 	</view>
 </template>
 
 <script>
 	import TopTabs from '../../components/TopTabs/topTabs.vue';
+	// import NoData from '../../components/NoData/index.vue';
 	export default {
 		components: {
 			TopTabs,
-
+			// NoData
 		},
 		data() {
 			return {
@@ -129,7 +132,7 @@
 			},
 			getOrderList(orderStatus) {
 				this.$api.get('/merchant/hotel/order/getMerchantOrderPageList', {
-					homestayId: '1711268640588517378',
+					homestayId: this.homestayId,
 					limit: this.limit,
 					page: this.page,
 					orderStatus: orderStatus ? orderStatus : ''
@@ -140,6 +143,7 @@
 							this.dataList[index].arriveDate = i.arriveDate.slice(0, 10)
 							this.dataList[index].leaveDate = i.leaveDate.slice(0, 10)
 						})
+						console.log(this.dataList,'this.dataList');
 					} else {
 						uni.showToast({
 							title: res.data.msg,
@@ -175,7 +179,7 @@
 			},
 			handleDetail(item) {
 				uni.navigateTo({
-					url: '/pages/house/orderInfo?orderId='+item.id
+					url: '/pages/house/orderInfo?orderId=' + item.id
 				})
 			},
 			changeTab(index) {
@@ -272,6 +276,11 @@
 			flex-direction: column;
 			padding: 0 20rpx;
 
+			.nodata {
+				background: white;
+
+			}
+
 			.card {
 				background: #fff;
 				border-radius: 16rpx;

+ 4 - 0
pagesMy/stayInfo/roomPosition.vue

@@ -66,6 +66,7 @@
 	export default {
 		data() {
 			return {
+				
 				selectIndex: undefined,
 				selectAddr: {},
 				searchWords: "",
@@ -150,6 +151,9 @@
 			// });
 		},
 		methods: {
+			changeBegin(){
+				this.visible=true
+			},
 			myPosition() {
 				var myAmapFun = new amapFile.AMapWX({
 					key: '1173b1eb83eb93bff1fb4a5987503a51'