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

优化代码

上级 507a2bf1
......@@ -58,6 +58,7 @@ export const getMessage = () => {
};
export const getOneStopMyInfo = (params = {}) => {
console.log('getOneStopMyInfo');
return uaaRequest('/UserApi/getMy', params).then((res) => {
if (res) {
if(!res.groupsId){
......
......@@ -10,7 +10,7 @@ export function getHeaders(url = '') {
const currentInfo = getCurrentUser() || {};
const user = getUserInfo() || {};
const userId = user.id || currentInfo.xgUserId;
const timestamp = new Date().getTime() + user.differenceBetweenServerAndClientTime;
const timestamp = user.differenceBetweenServerAndClientTime ? new Date().getTime() + user.differenceBetweenServerAndClientTime : new Date().getTime();
const secretString = token + userId + timestamp;
if(!token || token === 'null'){
return {
......
......@@ -21,6 +21,7 @@ export const getTime = () => {
} else {
return new Promise((resolve) => {
resolve(0);
return 0;
});
}
};
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论