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

28201 移植2.0的提前入库功能到1.0,后端接口已经构建到测试环境

上级 17415f8a
......@@ -44,7 +44,8 @@ const queryConfig = (key) => {
if (typeof key === 'undefined') return dynamicConfig;
if(dynamicConfig[key] && typeof dynamicConfig[key] === 'string' && process.env.NODE_ENV === 'development'){
let url = dynamicConfig[key];
url = url.replace('https://yx.bpi.edu.cn/produce', 'http://localhost:8010/produce');
// url = url.replace('https://yx.bpi.edu.cn/produce', 'http://localhost:8010/produce');
url = url.replace('https://yx.bpi.edu.cn/produce', 'http://localhost:8000/produce');
url = url.replace('http://scjoyedu.eicp.net:51352/produce', 'http://localhost:8000/produce');
return url;
}
......
import request from '@/webPublic/zyd_public/request/request';
import config from '@/config/config';
window.differenceBetweenServerAndClientTime = 0;
export const getTime = () => {
return request(`${config.mockServer}/${config.gateWayUrl.zydxg}/InstructorConfigApi/getCurrentDate`, {
method: 'POST',
body: {},
}).then((t) => {
if (t) {
window.differenceBetweenServerAndClientTime = t - new Date().getTime(); // 服务器时间 与 客户端时间的差值
}
return true;
});
if (window.specialImportantSystemConfig && window.specialImportantSystemConfig.mockServer) {
return request(
`${window.specialImportantSystemConfig.mockServer}/${window.specialImportantSystemConfig.gateWayUrl.zydxg}/InstructorConfigApi/getCurrentDate`,
{
method: 'POST',
body: {},
},
)
.then(t => {
if (t) {
window.differenceBetweenServerAndClientTime = t - new Date().getTime(); // 服务器时间 与 客户端时间的差值
}
return true;
});
} else {
return new Promise((resolve) => {
window.differenceBetweenServerAndClientTime = 0;
resolve(true);
});
}
};
export async function queryCurrent() {
let t = await getTime();
return request(`${config.mockServer}/${config.gateWayUrl.zydxg}/UserApi/queryCurrent`, {
method: 'POST',
body: {
},
});
if (window.specialImportantSystemConfig && window.specialImportantSystemConfig.mockServer) {
return request(
`${window.specialImportantSystemConfig.mockServer}/${window.specialImportantSystemConfig.gateWayUrl.zydxg}/UserApi/queryCurrent`,
{
method: 'POST',
body: {},
},
);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论