2.21 修改用户登出接口地址

This commit is contained in:
jl-zhoujl2
2023-02-21 11:08:04 +08:00
parent b98e10aa64
commit d5791b1184
4 changed files with 15 additions and 15 deletions

View File

@ -31,14 +31,14 @@ const GlobalHeaderRight: React.FC<{}> = (props) => {
} }
//角色退出登录 //角色退出登录
const toLogout = () => { const toLogout = () => {
let _data = { // let _data = {
mall3_token: sessionStorage.getItem('Authorization') // mall3_token: sessionStorage.getItem('Authorization')
} // }
Modal.info({ Modal.info({
title: '请确认是否退出?', title: '请确认是否退出?',
content: false, content: false,
onOk() { onOk() {
getLogout({ ..._data }).then((res) => { getLogout().then((res) => {
if (res?.success) { if (res?.success) {
if (data?.userType == "0") {//联通智慧门户 if (data?.userType == "0") {//联通智慧门户
window.close(); window.close();

View File

@ -16,9 +16,9 @@ export async function fgetUserMsg(params: any) {
}); });
} }
export async function getLogout(params: any) { // 退出登录,注销 export async function getLogout() { // 退出登录,注销
return request('/api/auth/logout', { return request('/api/core-service-ebtp-userinfo/v1/userinfo/logout', {
method: 'get', method: 'get',
params // params
}); });
} }

View File

@ -19,7 +19,7 @@ const RequestTimeoutPage: React.FC<{}> = () => {
const { Text } = Typography; const { Text } = Typography;
const [time, setTime] = useState<number>(10); const [time, setTime] = useState<number>(10);
const roleData = getSessionRoleData(); const roleData = getSessionRoleData();
const token = sessionStorage.getItem('Authorization'); // const token = sessionStorage.getItem('Authorization');
useEffect(() => { useEffect(() => {
let timeInteval: any let timeInteval: any
@ -49,7 +49,7 @@ const RequestTimeoutPage: React.FC<{}> = () => {
} }
} }
const redirectLogin = () => { const redirectLogin = () => {
logoutTokenApi({ mall3_token: token }).then(res => { logoutTokenApi().then(res => {
history.replace({ history.replace({
pathname: '/userformal/login', pathname: '/userformal/login',
}) })

View File

@ -130,9 +130,9 @@ export async function getFakeCaptcha(params: any) {
* @param params * @param params
* @returns * @returns
*/ */
export async function logoutTokenApi(params: any) { export async function logoutTokenApi() {
return request('/api/auth/logout', { return request('/api/core-service-ebtp-userinfo/v1/userinfo/logout', {
method: 'GET', method: 'GET',
params: params // params: params
}); });
} }