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

删除垃圾代码

上级 b792eed4
...@@ -39,11 +39,11 @@ export const dispatch = (type, payload, callback) => { ...@@ -39,11 +39,11 @@ export const dispatch = (type, payload, callback) => {
export const isFromIframe = () => { // 判断是否来自iframe 嵌入页面 暂时放弃使用 export const isFromIframe = () => { // 判断是否来自iframe 嵌入页面 暂时放弃使用
return false; return false;
let isFromIframe = window.frames.length !== parent.frames.length; let isFromIframe = window.frames.length !== parent.frames.length;
if(window.location.origin.indexOf('localhost') > -1){ if (window.location.origin.indexOf('localhost') > -1) {
return false; return false;
} }
return isFromIframe; return isFromIframe;
} };
export const getModal = () => { export const getModal = () => {
return isFromIframe() ? window?.parent?.iframeParentComponent?.Modal : Modal; return isFromIframe() ? window?.parent?.iframeParentComponent?.Modal : Modal;
...@@ -58,16 +58,18 @@ export const getMessage = () => { ...@@ -58,16 +58,18 @@ export const getMessage = () => {
}; };
export const getOneStopMyInfo = (params = {}) => { export const getOneStopMyInfo = (params = {}) => {
return uaaRequest('/UserApi/getMy', params).then((res) => { return uaaRequest('/UserApi/getMy', params)
if (res) { .then((res) => {
if(!res.groupsId){ if (res) {
res.groupsId = 'pub'; if (!res.groupsId) {
res.groupsId = 'pub';
}
return getTime()
.then((t) => {
res.differenceBetweenServerAndClientTime = t;
localStorage.setItem('user', JSON.stringify(res));
return res;
});
} }
return getTime().then((t) => { });
res.differenceBetweenServerAndClientTime = t;
localStorage.setItem('user', JSON.stringify(res));
return res;
});
}
});
}; };
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论