gcz 4 سال پیش
والد
کامیت
dbef047d0b
1فایلهای تغییر یافته به همراه3 افزوده شده و 1 حذف شده
  1. 3 1
      pages/index/index.vue

+ 3 - 1
pages/index/index.vue

@@ -94,7 +94,9 @@
 		onShow() {
 		onShow() {
 			if(this.$store.state.vuex_hasLogin){
 			if(this.$store.state.vuex_hasLogin){
 				this.userInfo = this.$store.state.vuex_user;
 				this.userInfo = this.$store.state.vuex_user;
-				this.theRoad = this.$store.state.vuex_user.roadList[0]||[];
+				if(this.$store.state.vuex_user.roadList){
+					this.theRoad = this.$store.state.vuex_user.roadList[0]||[];
+				};
 				if(this.theRoad.roadNo){
 				if(this.theRoad.roadNo){
 					console.log('this.theRoad.roadNo',this.theRoad.roadNo)
 					console.log('this.theRoad.roadNo',this.theRoad.roadNo)
 					this.handleGetIndex(this.theRoad.roadNo);
 					this.handleGetIndex(this.theRoad.roadNo);