修改第三方登录

This commit is contained in:
459816669@qq.com 2021-05-08 20:38:08 +08:00
parent 9b31643e83
commit 356b603e55
3 changed files with 10 additions and 10 deletions

View File

@ -88,7 +88,7 @@ public class ThirdOauthController extends BaseController {
* 回调结果
*/
@SuppressWarnings("unchecked")
@GetMapping("/auth/callback/{source}")
@GetMapping("/dingTalkLogin")
public Object callbackAuth(@PathVariable("source") String source, AuthCallback callback, HttpServletRequest request)
{
@ -146,7 +146,7 @@ public class ThirdOauthController extends BaseController {
/**
* 检查是否授权
*/
@PostMapping("/auth/checkAuthUser")
@PostMapping("/checkAuthUser")
@ResponseBody
public AjaxResult checkAuthUser(SysAuthUser authUser)
{
@ -162,7 +162,7 @@ public class ThirdOauthController extends BaseController {
/**
* 取消授权
*/
@PostMapping("/auth/unlock")
@PostMapping("/unlock")
@ResponseBody
public AjaxResult unlockAuth(SysAuthUser authUser)
{

View File

@ -6,7 +6,7 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:mysql://localhost:3306/snow?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
url: jdbc:mysql://localhost:3306/snow-dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=false&serverTimezone=GMT%2B8
username: root
password: root
# 从库数据源

View File

@ -150,12 +150,12 @@
<div id="authlist" class="user-bind">
<a class="third-app" href="#" onclick="authUrl('gitee');" title="使用 Gitee 账号授权登录">
<div class="git-other-login-icon"><img th:src="@{/img/gitee.svg}"></div>
<span class="app-name">Gitee</span></a>
<span class="app-name">DingTalk</span></a>
<a class="third-app" href="#" onclick="authUrl('github');" title="使用 GitHub 账号授权登录">
<!-- <a class="third-app" href="#" onclick="authUrl('github');" title="使用 GitHub 账号授权登录">
<div class="git-other-login-icon"><img th:src="@{/img/github.svg}"></div>
<span class="app-name">Github</span></a>
-->
<a class="third-app" href="#" title="功能开发中...">
<div class="git-other-login-icon"><img th:src="@{/img/weixin.svg}"></div>
<span class="app-name">WeiXin</span></a>
@ -381,7 +381,7 @@
$.modal.confirm("您确定要解除" + source + "的账号绑定吗?", function() {
$.ajax({
type: "post",
url: ctx + "auth/unlock",
url: ctx + "/third/oauth/unlock",
data: { "authId": authId },
success: function(r) {
if (r.code == web_status.SUCCESS) {
@ -399,11 +399,11 @@
function authUrl(source) {
$.ajax({
type: "post",
url: ctx + "auth/checkAuthUser",
url: "/third/oauth/checkAuthUser",
data: { "source": source },
success: function(r) {
if (r.code == web_status.SUCCESS) {
var url = ctx + "auth/" + source;
var url = "/third/oauth/toDingPage/" + source;
top.location.href =url;
} else {
$.modal.msgError(r.msg);