forked from github/dataease
fix(登录): 扫码登录失败错误提示
This commit is contained in:
parent
2c09394481
commit
9df4f4f2fd
@ -119,7 +119,7 @@ public class XDingtalkServer {
|
|||||||
LogUtil.error(e);
|
LogUtil.error(e);
|
||||||
Cookie cookie_error = new Cookie("DingtalkError", msg);
|
Cookie cookie_error = new Cookie("DingtalkError", msg);
|
||||||
cookie_error.setPath("/");
|
cookie_error.setPath("/");
|
||||||
|
response.addCookie(cookie_error);
|
||||||
return modelAndView;
|
return modelAndView;
|
||||||
} catch (UnsupportedEncodingException e1) {
|
} catch (UnsupportedEncodingException e1) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -123,7 +123,7 @@ public class XLarkServer {
|
|||||||
LogUtil.error(e);
|
LogUtil.error(e);
|
||||||
Cookie cookie_error = new Cookie("LarkError", msg);
|
Cookie cookie_error = new Cookie("LarkError", msg);
|
||||||
cookie_error.setPath("/");
|
cookie_error.setPath("/");
|
||||||
|
response.addCookie(cookie_error);
|
||||||
return modelAndView;
|
return modelAndView;
|
||||||
} catch (UnsupportedEncodingException e1) {
|
} catch (UnsupportedEncodingException e1) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -124,7 +124,7 @@ public class XWecomServer {
|
|||||||
LogUtil.error(e);
|
LogUtil.error(e);
|
||||||
Cookie cookie_error = new Cookie("WecomError", msg);
|
Cookie cookie_error = new Cookie("WecomError", msg);
|
||||||
cookie_error.setPath("/");
|
cookie_error.setPath("/");
|
||||||
|
response.addCookie(cookie_error);
|
||||||
return modelAndView;
|
return modelAndView;
|
||||||
} catch (UnsupportedEncodingException e1) {
|
} catch (UnsupportedEncodingException e1) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -233,6 +233,24 @@ export default {
|
|||||||
this.$error(msg)
|
this.$error(msg)
|
||||||
}
|
}
|
||||||
this.clearOidcMsg()
|
this.clearOidcMsg()
|
||||||
|
|
||||||
|
if (Cookies.get('WecomError')) {
|
||||||
|
this.$error(Cookies.get('WecomError'))
|
||||||
|
this.switchCodeIndex(4)
|
||||||
|
}
|
||||||
|
this.clearWecomMsg()
|
||||||
|
|
||||||
|
if (Cookies.get('DingtalkError')) {
|
||||||
|
this.$error(Cookies.get('DingtalkError'))
|
||||||
|
this.switchCodeIndex(5)
|
||||||
|
}
|
||||||
|
this.clearDingtalkMsg()
|
||||||
|
|
||||||
|
if (Cookies.get('LarkError')) {
|
||||||
|
this.$error(Cookies.get('LarkError'))
|
||||||
|
this.switchCodeIndex(6)
|
||||||
|
}
|
||||||
|
this.clearLarkMsg()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
@ -254,6 +272,15 @@ export default {
|
|||||||
Cookies.remove('OidcError')
|
Cookies.remove('OidcError')
|
||||||
Cookies.remove('IdToken')
|
Cookies.remove('IdToken')
|
||||||
},
|
},
|
||||||
|
clearWecomMsg() {
|
||||||
|
Cookies.remove('WecomError')
|
||||||
|
},
|
||||||
|
clearDingtalkMsg() {
|
||||||
|
Cookies.remove('DingtalkError')
|
||||||
|
},
|
||||||
|
clearLarkMsg() {
|
||||||
|
Cookies.remove('LarkError')
|
||||||
|
},
|
||||||
showLoginImage(uiInfo) {
|
showLoginImage(uiInfo) {
|
||||||
this.uiInfo = getSysUI()
|
this.uiInfo = getSysUI()
|
||||||
if (!this.uiInfo || Object.keys(this.uiInfo).length === 0) {
|
if (!this.uiInfo || Object.keys(this.uiInfo).length === 0) {
|
||||||
@ -287,6 +314,9 @@ export default {
|
|||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.initCache()
|
this.initCache()
|
||||||
this.clearOidcMsg()
|
this.clearOidcMsg()
|
||||||
|
this.clearWecomMsg()
|
||||||
|
this.clearDingtalkMsg()
|
||||||
|
this.clearLarkMsg()
|
||||||
this.$refs.loginForm.validate(valid => {
|
this.$refs.loginForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
|
Loading…
Reference in New Issue
Block a user