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

优化代码

上级 80d1193a
...@@ -4,7 +4,7 @@ import { setCurrentUser } from '@/H5Public/utils/2022new/currentUser'; ...@@ -4,7 +4,7 @@ import { setCurrentUser } from '@/H5Public/utils/2022new/currentUser';
window.differenceBetweenServerAndClientTime = 0; window.differenceBetweenServerAndClientTime = 0;
const config = window.specialImportantSystemConfig || {}; const config = window.specialImportantSystemConfig || {};
const getTime = () => { const getTime = () => {
return request(`${config.mockServer}/${config?.gateWayUrl?.zydxg}/InstructorConfigApi/getCurrentDate`, { return request(`${config.mockServer}${config?.gateWayUrl?.zydxg}/InstructorConfigApi/getCurrentDate`, {
method: 'POST', method: 'POST',
body: {}, body: {},
}); });
...@@ -16,7 +16,7 @@ export async function queryCurrent() { ...@@ -16,7 +16,7 @@ export async function queryCurrent() {
window.differenceBetweenServerAndClientTime = t - new Date().getTime(); // 服务器时间 与 客户端时间的差值 window.differenceBetweenServerAndClientTime = t - new Date().getTime(); // 服务器时间 与 客户端时间的差值
console.log(window.differenceBetweenServerAndClientTime); console.log(window.differenceBetweenServerAndClientTime);
} }
return request(`${config.mockServer}/${config?.gateWayUrl?.zydxg}/UserApi/queryCurrent`, { return request(`${config.mockServer}${config?.gateWayUrl?.zydxg}/UserApi/queryCurrent`, {
method: 'POST', method: 'POST',
body: {}, body: {},
}).then((res) => { }).then((res) => {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论