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

移动端签名组件重构

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