mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-15 03:25:06 +08:00
1. 修复“登陆”=》“登录”
2. 增加社交平台的绑定与解绑
This commit is contained in:
@ -39,15 +39,15 @@ export function getCodeImg() {
|
||||
})
|
||||
}
|
||||
|
||||
// 社交登陆的跳转
|
||||
export function socialLoginRedirect(type, redirectUri) {
|
||||
// 社交授权的跳转
|
||||
export function socialAuthRedirect(type, redirectUri) {
|
||||
return request({
|
||||
url: '/social-login-redirect?type=' + type + '&redirectUri=' + redirectUri,
|
||||
url: '/social-auth-redirect?type=' + type + '&redirectUri=' + redirectUri,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 社交登陆,使用 code 授权码
|
||||
// 社交登录,使用 code 授权码
|
||||
export function socialLogin(type, code, state) {
|
||||
return request({
|
||||
url: '/social-login',
|
||||
@ -60,7 +60,7 @@ export function socialLogin(type, code, state) {
|
||||
})
|
||||
}
|
||||
|
||||
// 社交登陆,使用 code 授权码 + + 账号密码
|
||||
// 社交登录,使用 code 授权码 + + 账号密码
|
||||
export function socialLogin2(type, code, state, username, password) {
|
||||
return request({
|
||||
url: '/social-login2',
|
||||
|
@ -47,7 +47,7 @@ const user = {
|
||||
})
|
||||
},
|
||||
|
||||
// 社交登陆
|
||||
// 社交登录
|
||||
SocialLogin({ commit }, userInfo) {
|
||||
const code = userInfo.code
|
||||
const state = userInfo.state
|
||||
@ -64,7 +64,7 @@ const user = {
|
||||
})
|
||||
},
|
||||
|
||||
// 社交登陆
|
||||
// 社交登录
|
||||
SocialLogin2({ commit }, userInfo) {
|
||||
const code = userInfo.code
|
||||
const state = userInfo.state
|
||||
|
@ -419,7 +419,7 @@
|
||||
<li>修复表格时间为空出现的异常</li>
|
||||
<li>添加Jackson日期反序列化时区配置</li>
|
||||
<li>调整根据用户权限加载菜单数据树形结构</li>
|
||||
<li>调整成功登陆不恢复按钮,防止多次点击</li>
|
||||
<li>调整成功登录不恢复按钮,防止多次点击</li>
|
||||
<li>修改用户个人资料同步缓存信息</li>
|
||||
<li>修复页面同时出现el-upload和Editor不显示处理</li>
|
||||
<li>修复在角色管理页修改菜单权限偶尔未选中问题</li>
|
||||
|
@ -45,7 +45,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCodeImg,socialLoginRedirect } from "@/api/login";
|
||||
import { getCodeImg,socialAuthRedirect } from "@/api/login";
|
||||
import Cookies from "js-cookie";
|
||||
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
||||
import {InfApiErrorLogProcessStatusEnum, SysUserSocialTypeEnum} from "@/utils/constants";
|
||||
@ -133,14 +133,14 @@ export default {
|
||||
},
|
||||
doSocialLogin(socialTypeEnum) {
|
||||
// console.log("开始Oauth登录...%o", socialTypeEnum.code);
|
||||
// 设置登陆中
|
||||
// 设置登录中
|
||||
this.loading = true;
|
||||
// 计算 redirectUri
|
||||
const redirectUri = location.origin + '/social-login?type=' + socialTypeEnum.type + '&redirect=' + (this.redirect || "/"); // 重定向不能丢
|
||||
// const redirectUri = 'http://127.0.0.1:48080/api/gitee/callback';
|
||||
// const redirectUri = 'http://127.0.0.1:48080/api/dingtalk/callback';
|
||||
// 进行跳转
|
||||
socialLoginRedirect(socialTypeEnum.type, encodeURIComponent(redirectUri)).then((res) => {
|
||||
socialAuthRedirect(socialTypeEnum.type, encodeURIComponent(redirectUri)).then((res) => {
|
||||
// console.log(res.url);
|
||||
window.location.href = res.data;
|
||||
});
|
||||
|
@ -51,7 +51,7 @@ export default {
|
||||
},
|
||||
loading: false,
|
||||
redirect: undefined,
|
||||
// 社交登陆相关
|
||||
// 社交登录相关
|
||||
type: undefined,
|
||||
code: undefined,
|
||||
state: undefined,
|
||||
@ -70,7 +70,7 @@ export default {
|
||||
// 重定向地址
|
||||
this.redirect = this.$route.query.redirect;
|
||||
debugger
|
||||
// 社交登陆相关
|
||||
// 社交登录相关
|
||||
this.type = this.$route.query.type;
|
||||
this.code = this.$route.query.code;
|
||||
this.state = this.$route.query.state;
|
||||
|
@ -132,7 +132,7 @@ export default {
|
||||
}).then(function() {
|
||||
return exportLoginLog(queryParams);
|
||||
}).then(response => {
|
||||
this.downloadExcel(response, '登陆日志.xls');
|
||||
this.downloadExcel(response, '登录日志.xls');
|
||||
})
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
<el-table-column label="会话编号" align="center" prop="id" width="300" />
|
||||
<el-table-column label="登录名称" align="center" prop="username" width="100" />
|
||||
<el-table-column label="部门名称" align="center" prop="deptName" width="100" />
|
||||
<el-table-column label="登陆地址" align="center" prop="userIp" width="100" />
|
||||
<el-table-column label="登录地址" align="center" prop="userIp" width="100" />
|
||||
<el-table-column label="userAgent" align="center" prop="userAgent" :show-overflow-tooltip="true" />
|
||||
<el-table-column label="登录时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
|
Reference in New Issue
Block a user