refactor(系统设置): 扫码登陆报错信息弹出

This commit is contained in:
guoyuqi 2024-06-17 19:44:37 +08:00 committed by Craftsman
parent 9dc20b5ca6
commit ae5ea6394e
3 changed files with 6 additions and 5 deletions

View File

@ -81,7 +81,7 @@ export function getWeComInfo() {
export function getWeComCallback(code: string) {
return MSR.get<LoginRes>(
{ url: GetWeComCallbackUrl, params: { code } },
{ ignoreCancelToken: true, errorMessageMode: 'message' }
{ ignoreCancelToken: true, errorMessageMode: 'modal' }
);
}
@ -92,7 +92,7 @@ export function getDingInfo() {
export function getDingCallback(code: string) {
return MSR.get<LoginRes>(
{ url: GetDingCallbackUrl, params: { code } },
{ ignoreCancelToken: true, errorMessageMode: 'message' }
{ ignoreCancelToken: true, errorMessageMode: 'modal' }
);
}
export function logout() {

View File

@ -73,9 +73,9 @@
},
});
// 使code
console.log(authCode);
},
(errorMsg) => {
Message.error(`errorMsg of errorCbk: ${errorMsg}`);
// ,使toast
console.error(`errorMsg of errorCbk: ${errorMsg}`);
}

View File

@ -16,7 +16,7 @@
import { getFirstRouteNameByPermission, routerNameHasPermission } from '@/utils/permission';
import * as ww from '@wecom/jssdk';
import { WWLoginPanelSizeType, WWLoginRedirectType, WWLoginType } from '@wecom/jssdk';
import { WWLoginErrorResp, WWLoginPanelSizeType, WWLoginRedirectType, WWLoginType } from '@wecom/jssdk';
const { t } = useI18n();
@ -74,7 +74,8 @@
},
});
},
onLoginFail(err: any) {
onLoginFail(err: WWLoginErrorResp) {
Message.error(`errorMsg of errorCbk: ${err.errMsg}`);
console.log(err);
},
});