From 41d140af1136ff0e1114ec2953cdfeecd7819dde Mon Sep 17 00:00:00 2001 From: yhan219 Date: Fri, 16 Jun 2023 15:58:13 +0000 Subject: [PATCH 1/3] =?UTF-8?q?!12=20[=E9=9C=80=E6=B1=82=E8=AE=A4=E9=A2=86?= =?UTF-8?q?]=20=E5=AF=B9=E6=8E=A5=20powerjob=20=E5=AE=9E=E7=8E=B0=E5=88=86?= =?UTF-8?q?=E5=B8=83=E5=BC=8F=E4=BB=BB=E5=8A=A1=E8=B0=83=E5=BA=A6=20?= =?UTF-8?q?=E9=9B=86=E6=88=90=E6=96=B9=E5=BC=8F=E5=8F=82=E8=80=83=E6=A1=86?= =?UTF-8?q?=E6=9E=B6=E5=86=85=20xxl-job=20*=20[=E9=9C=80=E6=B1=82=E8=AE=A4?= =?UTF-8?q?=E9=A2=86]=20=E5=AF=B9=E6=8E=A5=20powerjob=20=E5=AE=9E=E7=8E=B0?= =?UTF-8?q?=E5=88=86=E5=B8=83=E5=BC=8F=E4=BB=BB=E5=8A=A1=E8=B0=83=E5=BA=A6?= =?UTF-8?q?=20=E9=9B=86=E6=88=90=E6=96=B9=E5=BC=8F=E5=8F=82=E8=80=83?= =?UTF-8?q?=E6=A1=86=E6=9E=B6=E5=86=85=20xxl-job?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 4 ++-- .env.production | 4 ++-- src/types/env.d.ts | 2 +- src/views/index.vue | 2 +- src/views/monitor/{xxljob => powerjob}/index.vue | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename src/views/monitor/{xxljob => powerjob}/index.vue (67%) diff --git a/.env.development b/.env.development index 4ec5afb..6ca0e51 100644 --- a/.env.development +++ b/.env.development @@ -13,7 +13,7 @@ VITE_APP_CONTEXT_PATH = '/' # 监控地址 VITE_APP_MONITRO_ADMIN = 'http://localhost:9090/admin/applications' -# xxl-job 控制台地址 -VITE_APP_XXL_JOB_ADMIN = 'http://localhost:9100/xxl-job-admin' +# powerjob 控制台地址 +VITE_APP_POWERJOB_ADMIN = 'http://localhost:7700/' VITE_APP_PORT = 80 diff --git a/.env.production b/.env.production index 6e6510a..a5e77b3 100644 --- a/.env.production +++ b/.env.production @@ -10,8 +10,8 @@ VITE_APP_CONTEXT_PATH = '/' # 监控地址 VITE_APP_MONITRO_ADMIN = '/admin/applications' -# 监控地址 -VITE_APP_XXL_JOB_ADMIN = '/xxl-job-admin' +# powerjob 控制台地址 +VITE_APP_POWERJOB_ADMIN = '/powerjob' # 生产环境 VITE_APP_BASE_API = '/prod-api' diff --git a/src/types/env.d.ts b/src/types/env.d.ts index 7e5134a..032f52b 100644 --- a/src/types/env.d.ts +++ b/src/types/env.d.ts @@ -65,7 +65,7 @@ interface ImportMetaEnv { VITE_APP_BASE_URL: string; VITE_APP_CONTEXT_PATH: string; VITE_APP_MONITRO_ADMIN: string; - VITE_APP_XXL_JOB_ADMIN: string; + VITE_APP_POWERJOB_ADMIN: string; VITE_APP_ENV: string; } interface ImportMeta { diff --git a/src/views/index.vue b/src/views/index.vue index 70912af..4b3bebd 100644 --- a/src/views/index.vue +++ b/src/views/index.vue @@ -21,7 +21,7 @@ * 分布式锁 Lock4j 注解锁、工具锁 多种多样
* 分布式幂等 Lock4j 基于分布式锁实现
* 分布式链路追踪 SkyWalking 支持链路追踪、网格分析、度量聚合、可视化
- * 分布式任务调度 Xxl-Job 高性能 高可靠 易扩展
+ * 分布式任务调度 PowerJob 高性能 高可靠 易扩展
* 文件存储 Minio 本地存储
* 文件存储 七牛、阿里、腾讯 云存储
* 监控框架 SpringBoot-Admin 全方位服务监控
diff --git a/src/views/monitor/xxljob/index.vue b/src/views/monitor/powerjob/index.vue similarity index 67% rename from src/views/monitor/xxljob/index.vue rename to src/views/monitor/powerjob/index.vue index 9349081..0319e97 100644 --- a/src/views/monitor/xxljob/index.vue +++ b/src/views/monitor/powerjob/index.vue @@ -5,5 +5,5 @@ From aae6bb75059718ca4ae0b3361a1a7ea48faca87e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E4=B8=AA=E4=B8=89?= <2029364173@qq.com> Date: Tue, 20 Jun 2023 04:12:49 +0000 Subject: [PATCH 2/3] =?UTF-8?q?!16=20=E6=89=A9=E5=B1=95=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E7=99=BB=E5=BD=95=E6=8E=88=E6=9D=83=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=20*=20add=20=E7=AC=AC=E4=B8=89=E6=96=B9=E6=8E=88=E6=9D=83=20*?= =?UTF-8?q?=20add=20=E7=AC=AC=E4=B8=89=E6=96=B9=E6=8E=88=E6=9D=83=E7=99=BB?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + src/api/login.ts | 18 ++ src/api/system/social/auth.ts | 33 ++++ src/assets/icons/svg/gitee.svg | 1 + src/layout/components/socialLogin/index.vue | 36 ++++ src/permission.ts | 2 +- src/router/index.ts | 5 + src/views/login.vue | 181 +++++++++++-------- src/views/system/user/profile/index.vue | 16 +- src/views/system/user/profile/thirdParty.vue | 140 ++++++++++++++ 10 files changed, 359 insertions(+), 74 deletions(-) create mode 100644 src/api/system/social/auth.ts create mode 100644 src/assets/icons/svg/gitee.svg create mode 100644 src/layout/components/socialLogin/index.vue create mode 100644 src/views/system/user/profile/thirdParty.vue diff --git a/.gitignore b/.gitignore index 79e7fd9..40df474 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .DS_Store +.history node_modules/ dist/ npm-debug.log* diff --git a/src/api/login.ts b/src/api/login.ts index b95a0c0..48b62d1 100644 --- a/src/api/login.ts +++ b/src/api/login.ts @@ -60,6 +60,24 @@ export function getCodeImg(): AxiosPromise { timeout: 20000 }); } +/** + * 第三方登录 + * @param source 第三方登录类型 + * */ +export function socialLogin(source: string, code: any, state: any): AxiosPromise { + const data = { + code, + state + }; + return request({ + url: '/auth/social-login/' + source, + method: 'get', + headers: { + isToken: true + }, + params: data + }); +} // 获取用户详细信息 export function getInfo(): AxiosPromise { diff --git a/src/api/system/social/auth.ts b/src/api/system/social/auth.ts new file mode 100644 index 0000000..b1f2106 --- /dev/null +++ b/src/api/system/social/auth.ts @@ -0,0 +1,33 @@ +import request from '@/utils/request'; + +// 绑定账号 +export function authBinding(source: string) { + return request({ + url: '/auth/binding/' + source, + method: 'get', + headers: { + isToken: true + } + }); +} + +// 解绑账号 +export function authUnlock(authId: string) { + return request({ + url: '/auth/unlock/' + authId, + method: 'delete', + headers: { + isToken: true + } + }); +} +//获取授权列表 +export function getAuthList() { + return request({ + url: '/system/social/list', + method: 'get', + headers: { + isToken: true + } + }); +} diff --git a/src/assets/icons/svg/gitee.svg b/src/assets/icons/svg/gitee.svg new file mode 100644 index 0000000..6324608 --- /dev/null +++ b/src/assets/icons/svg/gitee.svg @@ -0,0 +1 @@ + diff --git a/src/layout/components/socialLogin/index.vue b/src/layout/components/socialLogin/index.vue new file mode 100644 index 0000000..e125c12 --- /dev/null +++ b/src/layout/components/socialLogin/index.vue @@ -0,0 +1,36 @@ + + + diff --git a/src/permission.ts b/src/permission.ts index 4713383..c2743eb 100644 --- a/src/permission.ts +++ b/src/permission.ts @@ -10,7 +10,7 @@ import useSettingsStore from '@/store/modules/settings'; import usePermissionStore from '@/store/modules/permission'; NProgress.configure({ showSpinner: false }); -const whiteList = ['/login', '/register']; +const whiteList = ['/login', '/register', '/social-login']; router.beforeEach(async (to, from, next) => { NProgress.start(); diff --git a/src/router/index.ts b/src/router/index.ts index 9540ab2..33e3e5e 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -37,6 +37,11 @@ export const constantRoutes: RouteOption[] = [ } ] }, + { + path: '/social-login', + hidden: true, + component: () => import('@/layout/components/socialLogin/index.vue') + }, { path: '/login', component: () => import('@/views/login.vue'), diff --git a/src/views/login.vue b/src/views/login.vue index 9559f9b..af98f01 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -4,7 +4,7 @@

RuoYi-Vue-Plus多租户管理系统

- + @@ -36,6 +36,20 @@ 立即注册 +
+ + + + + + + + + + + + +