From 3b027745b2d57c7c175a6b27698a5a35616ab3f4 Mon Sep 17 00:00:00 2001 From: XinWei <2718030729@qq.com> Date: Tue, 29 Oct 2024 16:54:22 +0800 Subject: [PATCH] =?UTF-8?q?xxl-job=E8=B7=B3=E8=BD=AC=E8=B7=AF=E5=BE=84?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/xxl/job/admin/client/OAuth2Client.java | 2 +- .../main/java/com/xxl/job/admin/client/UserClient.java | 2 +- .../src/main/resources/static/js/common.1.js | 2 +- .../src/main/resources/templates/login.ftl | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/OAuth2Client.java b/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/OAuth2Client.java index 26a081141..b34566d75 100644 --- a/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/OAuth2Client.java +++ b/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/OAuth2Client.java @@ -22,7 +22,7 @@ import java.nio.charset.StandardCharsets; @Component public class OAuth2Client { - private static final String BASE_URL = "https://mt.ptzykjgs.com/admin-api/system/oauth2"; + private static final String BASE_URL = "http://121.36.203.133/admin-api/system/oauth2"; /** * 租户编号 diff --git a/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/UserClient.java b/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/UserClient.java index 423a2347b..4757aa11b 100644 --- a/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/UserClient.java +++ b/ludu-job-admin/ludu-job-admin-biz/src/main/java/com/xxl/job/admin/client/UserClient.java @@ -21,7 +21,7 @@ import org.springframework.web.client.RestTemplate; @Component public class UserClient { - private static final String BASE_URL = "https://mt.ptzykjgs.com/admin-api/system/oauth2/user"; + private static final String BASE_URL = "http://121.36.203.133/admin-api/system/oauth2/user"; // @Resource // 可优化,注册一个 RestTemplate Bean,然后注入 private final RestTemplate restTemplate = new RestTemplate(); diff --git a/ludu-job-admin/ludu-job-admin-biz/src/main/resources/static/js/common.1.js b/ludu-job-admin/ludu-job-admin-biz/src/main/resources/static/js/common.1.js index 85dbf9864..d49f35ce0 100644 --- a/ludu-job-admin/ludu-job-admin-biz/src/main/resources/static/js/common.1.js +++ b/ludu-job-admin/ludu-job-admin-biz/src/main/resources/static/js/common.1.js @@ -23,7 +23,7 @@ $(function(){ title: I18n.system_tips, content: ('已退出登录!' || I18n.logout_success) });*/ - window.location.href = "https://mt.ptzykjgs.com/admin/logout" + window.location.href = "http://121.36.203.133/admin/logout" /*$.post(base_url + "/logout", function(data, status) { if (data.code == "200") { layer.msg( I18n.logout_success ); diff --git a/ludu-job-admin/ludu-job-admin-biz/src/main/resources/templates/login.ftl b/ludu-job-admin/ludu-job-admin-biz/src/main/resources/templates/login.ftl index 9bb65511d..d184b6c1d 100644 --- a/ludu-job-admin/ludu-job-admin-biz/src/main/resources/templates/login.ftl +++ b/ludu-job-admin/ludu-job-admin-biz/src/main/resources/templates/login.ftl @@ -47,9 +47,9 @@ */ function ssoLogin() { const clientId = 'ludu-job-admin'; // 可以改写成,你的 clientId - const redirectUri = encodeURIComponent('https://mt.ptzykjgs.com/xxl-job-admin/toLogin'); // 注意,需要使用 encodeURIComponent 编码地址 + const redirectUri = encodeURIComponent('http://121.36.203.133/xxl-job-admin/toLogin'); // 注意,需要使用 encodeURIComponent 编码地址 const responseType = 'code'; // 1)授权码模式,对应 code;2)简化模式,对应 token - window.location.href = 'https://mt.ptzykjgs.com/admin/sso?client_id=' + clientId + window.location.href = 'http://121.36.203.133/admin/sso?client_id=' + clientId + '&redirect_uri=' + redirectUri + '&response_type=' + responseType; } @@ -69,9 +69,9 @@ ssoLogin(); } else { // 提交 - const redirectUri = 'https://mt.ptzykjgs.com/xxl-job-admin/toLogin'; // 需要修改成,你回调的地址,就是在 index.html 拼接的 redirectUri + const redirectUri = 'http://121.36.203.133/xxl-job-admin/toLogin'; // 需要修改成,你回调的地址,就是在 index.html 拼接的 redirectUri $.ajax({ - url: "https://mt.ptzykjgs.com/xxl-job-admin/auth/login-by-code?code=" + code + url: "http:///xxl-job-admin/auth/login-by-code?code=" + code + '&redirectUri=' + redirectUri, method: 'POST', success: function (result) {