Selaa lähdekoodia

Https 问题处理

zhengkaixin 10 kuukautta sitten
vanhempi
commit
0a2083b6ad

+ 6 - 1
src/components/Common.vue

@@ -56,6 +56,11 @@
 			}
 		},
 		created() {
+			
+			var url=window.location.href
+			if(url&&url.indexOf('https://xpgj.hbjp.com.cn/')==0){
+				window.location.href="http://xpgj.hbjp.com.cn/prod/xsy/#/"
+			}
 			//公共组件的执行方法放在created中执行,父组件的create放在motuned中执行
 			if (isWeiXin()) {
 				if (this.checkOpenId) {
@@ -189,7 +194,7 @@
 				if(bl){
 					this.projectExchange();
 				}
-				this.$emit('asynCallBack');
+				this.$emit('asynCallBack',bl);
 			},
 			...mapMutations({
 				set_openid: types.SET_WEIXIN_OPENID,

+ 8 - 0
src/projects/business/views-home/User/Login.vue

@@ -37,6 +37,12 @@
 		</div>
 
 		<loading :visible="isLoading"></loading>
+		
+		<div style="
+    position: absolute;
+    bottom: 0;" >
+		当前页面连接:	{{url}}
+		</div>
 	</div>
 </template>
 
@@ -77,9 +83,11 @@
 				isLoading: false,
 
 				project: this.$route.query.project,
+				url:""
 			}
 		},
 		created() {
+			
 			//设置默认值,退出帐号后进入登录页面,输入框中保留上次登录时的姓名和手机号信息;
 			if (this.person_temp) {
 				this.subForm.name = this.person_temp.name;

+ 11 - 6
src/projects/business/views/Master/Home.vue

@@ -293,12 +293,17 @@
 					}
 				}
 			},
-			asynCallBack() {
-				//获取用户角色列表
-				this.getRoleList();
-				//获取最新二条通知消息
-				this.prefetchNotice();
-				this.getSpList();
+			asynCallBack(bl) {
+				if(!bl){
+					window.location.href = '#/user/login';
+				}else{
+					//获取用户角色列表
+					this.getRoleList();
+					//获取最新二条通知消息
+					this.prefetchNotice();
+					this.getSpList();
+				}
+				
 			},
 			...mapMutations({
 				set_wd_message_num: types.SET_WD_MESSAGE_NUM,