瀏覽代碼

auto commit

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);