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

移动端签名组件重构

上级 51712e05
......@@ -38,11 +38,16 @@ if(!globalThis.CONFIG){
};
}
const queryConfig = (key) => {
const dynamicConfig = typeof globalThis !== 'undefined' ? globalThis.CONFIG : window.CONFIG;
// console.log(dynamicConfig);
if (typeof key === 'undefined') return dynamicConfig;
if(dynamicConfig[key] && typeof dynamicConfig[key] === 'string'){
let url = dynamicConfig[key];
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;
}
return dynamicConfig[key];
};
......
......@@ -18,6 +18,7 @@ import { giveBase16EnCode, requestFileInfo } from '@/webPublic/one_stop_public/B
import objectToFormData from '@/webPublic/zyd_public/utils/object-to-formdata-custom';
import { getUrlInfo } from '@/webPublic/one_stop_public/DetailForAudit/utils';
import { getHeaders } from '@/webPublic/zyd_public/utils/utils';
import { proxyChangeUrl } from '@/webPublic/zyd_public/request/proxyChangeUrl';
const codeMessage = {
200: '服务器成功返回请求的数据。',
......@@ -142,6 +143,9 @@ export const request = (url, data, options = {}) => {
export const requestOrigin = (url, data, options = {}) => {
let version =
localStorage.getItem('version') && localStorage.getItem('version') !== 'undefined'
? JSON.parse(localStorage.getItem('version'))
......
......@@ -5,7 +5,7 @@ import { getUrlInfo } from '@/webPublic/one_stop_public/DetailForAudit/utils';
const isTest = getUrlInfo().test;
window.differenceBetweenServerAndClientTime = window.differenceBetweenServerAndClientTime || 0;
export function getHeaders(url = '') {
const token = getToken();
const currentInfo = getCurrentUser() || {};
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论