Explorar el Código

登录异常跳转

zhengkaixin hace 3 años
padre
commit
3955d665c3
Se han modificado 2 ficheros con 16 adiciones y 10 borrados
  1. 3 3
      src/components/Common.vue
  2. 13 7
      src/projects/business/views/Master/Home.vue

+ 3 - 3
src/components/Common.vue

@@ -143,7 +143,7 @@
 					if (token) {
 						this.getAuthFunList();
 					} else {
-						this.asynCallBack();
+						this.asynCallBack(true);
 					}
 
 				}).catch(error => {
@@ -184,9 +184,9 @@
 
 
 			//异步回调父组件的方法
-			asynCallBack() {
+			asynCallBack(bl) {
 				this.projectExchange();
-				this.$emit('asynCallBack');
+				this.$emit('asynCallBack',bl);
 			},
 			...mapMutations({
 				set_openid: types.SET_WEIXIN_OPENID,

+ 13 - 7
src/projects/business/views/Master/Home.vue

@@ -77,7 +77,7 @@
 							<img class="mui-media-object mui-pull-right" src="http://rccs.oss-cn-hangzhou.aliyuncs.com/jp_housekeeper/img/cicon35.png?x-oss-process=image/resize,h_50,m_lfit" width="54" />
 						</a>
 					</div>
-					<div v-if="noticeList.length" class="mui-col-xs-12">
+					<div v-if="noticeList&&noticeList.length" class="mui-col-xs-12">
 						<div class="vongi-floor-padded">
 							<router-link :to="{name:'CommonNotice',query:{type:1}}" v-for="(item,index) in noticeList" :key="index" :class="'text-list '+(item.readStatus?'':'red-after')">
 								<h5 class="mui-ellipsis" v-text="item.title"></h5><span v-text="item.date"></span>
@@ -219,7 +219,7 @@
 			     
 			
 			    }).catch(error => {
-			        this.mui.toast(error);
+			        mui.toast(error);
 			    })
 			},
 			bannerTipsHide() {
@@ -326,11 +326,17 @@
 					}
 				}
 			},
-			asynCallBack() {
-				//获取用户角色列表
-				this.getRoleList();
-				//获取最新二条通知消息
-				this.prefetchNotice();
+			asynCallBack(bl) {
+				
+				if(!bl){
+					//获取用户角色列表
+					this.getRoleList();
+					//获取最新二条通知消息
+					this.prefetchNotice();
+				}else{
+					window.location.href = '../home/#/select';
+				}
+				
 			},
 			...mapMutations({
 				set_wd_message_num: types.SET_WD_MESSAGE_NUM,