提交 2320d4e7 authored 作者: 钟是志's avatar 钟是志

退出登录修改

上级 4e58d3c6
...@@ -33,5 +33,5 @@ export const getCookie = function(name) { ...@@ -33,5 +33,5 @@ export const getCookie = function(name) {
* @param name cookie的名称 * @param name cookie的名称
*/ */
export const delCookie = function(name) { export const delCookie = function(name) {
setCookie(name, ' ', -1); setCookie(name, '', -1);
}; };
...@@ -7,7 +7,7 @@ import { delCookie, setCookie } from '@/webPublic/one_stop_public/utils/cookie'; ...@@ -7,7 +7,7 @@ import { delCookie, setCookie } from '@/webPublic/one_stop_public/utils/cookie';
export function setToken(value, time) { export function setToken(value, time) {
if (getToken() !== value) { if (getToken() !== value) {
setCookie('token', value); setCookie('token', value, 1);
sessionStorage.removeItem('cacheMobile'); sessionStorage.removeItem('cacheMobile');
localStorage.setItem('antd-pro-token-onestop', value); localStorage.setItem('antd-pro-token-onestop', value);
localStorage.setItem('antd-pro-token', value); localStorage.setItem('antd-pro-token', value);
...@@ -62,10 +62,12 @@ export const getUserInfo = () => { ...@@ -62,10 +62,12 @@ export const getUserInfo = () => {
}; };
} }
}; };
export function setFetchUrl(data) { export function setFetchUrl(data) {
return localStorage.setItem('fetch-url-data', data); return localStorage.setItem('fetch-url-data', data);
} }
export function getFetchUrl() { export function getFetchUrl() {
return localStorage.getItem('fetch-url-data'); return localStorage.getItem('fetch-url-data');
...@@ -73,8 +75,9 @@ export function getFetchUrl() { ...@@ -73,8 +75,9 @@ export function getFetchUrl() {
export function getType() { export function getType() {
return localStorage.getItem('antd-pro-type')||""; return localStorage.getItem('antd-pro-type') || '';
} }
export function setType(type) { export function setType(type) {
return localStorage.setItem('antd-pro-type', type); return localStorage.setItem('antd-pro-type', type);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论