1004749546@qq.com 4 years ago
parent
commit
10323581e4
1 changed files with 7 additions and 6 deletions
  1. 7 6
      pages/order/index.vue

+ 7 - 6
pages/order/index.vue

@@ -67,13 +67,12 @@
 			// this.getOrderListData()
 		},
 		onShow() {
-			this.getOrderListData()
 			checkLogin().then(res => {
 				this.hasLogin=res.status==200
 				if(this.hasLogin){
-					this.pageInit()
+					this.getOrderListData()
 				}else{
-					this.noDataText="您尚未登录或登录已过期,完成登录后可查看数据信息!"
+					this.noDataText="您尚未登录或登录已过期!"
 				}
 			})
 		},
@@ -101,10 +100,12 @@
 							    item.isUp = false
 							})
 						}
-						this.$nextTick(function(){
-							this.orderList=res.data || []
-						})
+						this.orderList=res.data || []
+						this.noDataText = '暂无数据'
 						console.log(this.orderList,'------------this.orderList')
+					} else {
+						this.orderList = []
+						this.noDataText = res.message
 					}
 				})
 			},