diff --git a/mayfly_go_web/src/common/openApi.ts b/mayfly_go_web/src/common/openApi.ts
index d7404881..062d8ada 100644
--- a/mayfly_go_web/src/common/openApi.ts
+++ b/mayfly_go_web/src/common/openApi.ts
@@ -6,6 +6,7 @@ export default {
changePwd: (param: any) => request.post('/sys/accounts/change-pwd', param),
getPublicKey: () => request.get('/common/public-key'),
getConfigValue: (params: any) => request.get('/sys/configs/value', params),
+ oauthConfig: () => request.get('/sys/configs/auth'),
captcha: () => request.get('/sys/captcha'),
logout: () => request.post('/sys/accounts/logout/{token}'),
getPermissions: () => request.get('/sys/accounts/permissions'),
diff --git a/mayfly_go_web/src/views/login/component/AccountLogin.vue b/mayfly_go_web/src/views/login/component/AccountLogin.vue
index e72bdaf4..5f7ff958 100644
--- a/mayfly_go_web/src/views/login/component/AccountLogin.vue
+++ b/mayfly_go_web/src/views/login/component/AccountLogin.vue
@@ -2,37 +2,24 @@
-
+
-
+
-
+
-
![]()
+
@@ -47,21 +34,19 @@
-
+
-
+
-
+
@@ -73,28 +58,17 @@
-
-
+
+
-
+
@@ -265,10 +239,14 @@ const onSignIn = async () => {
return;
}
state.showLoginFailTips = false;
+ loginResDeal(loginRes);
+}
+
+const loginResDeal = (loginRes: any) => {
// 用户信息
const userInfos = {
name: loginRes.name,
- username: state.loginForm.username,
+ username: loginRes.username,
// 头像
photo: letterAvatar(state.loginForm.username),
time: new Date().getTime(),
@@ -297,6 +275,10 @@ const onSignIn = async () => {
}, 400);
};
+defineExpose({
+ loginResDeal
+});
+
// 登录成功后的跳转
const signInSuccess = async (accessToken: string = '') => {
// 存储 token 到浏览器缓存
diff --git a/mayfly_go_web/src/views/login/index.vue b/mayfly_go_web/src/views/login/index.vue
index 0f337dc5..36e83c0c 100644
--- a/mayfly_go_web/src/views/login/index.vue
+++ b/mayfly_go_web/src/views/login/index.vue
@@ -9,7 +9,7 @@
-
+
-
+
+
+
+
+
+
+
+
+
+
+
@@ -160,18 +154,18 @@
立即设置
-
+ -->
-
绑定QQ
-
已绑定QQ:110****566
+
绑定OAuth2
+
已绑定OAuth2
- 立即设置
+ 立即绑定
-
-->
+
diff --git a/mayfly_go_web/src/views/system/auth/AuthInfo.vue b/mayfly_go_web/src/views/system/auth/AuthInfo.vue
index a37b6db5..39fe8451 100644
--- a/mayfly_go_web/src/views/system/auth/AuthInfo.vue
+++ b/mayfly_go_web/src/views/system/auth/AuthInfo.vue
@@ -22,22 +22,28 @@
+ placeholder="授权码获取地址 例如: https://example.com/oauth/authorize">
-
+
-
+
-
+
-
+
-
+
+
+
+
保存
@@ -50,7 +56,7 @@
" +
+ "