From 6226fcf27f6c99b4bc06708f1723aef9d3c78898 Mon Sep 17 00:00:00 2001 From: king <18310653075@163.com> Date: 星期一, 10 二月 2025 10:56:37 +0800 Subject: [PATCH] 2025-02-10 --- src/index.js | 1 + src/api/index.js | 45 +++++---------------------------------------- src/tabviews/custom/components/timeline/normal-timeline/index.jsx | 2 +- 3 files changed, 7 insertions(+), 41 deletions(-) diff --git a/src/api/index.js b/src/api/index.js index e43c5bd..23aaaf7 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -138,36 +138,12 @@ // } /** - * @description 寰俊涓氬姟璇锋眰 - * 39涓� qingqiumarket.cn|cloud.mk9h.cn|sso.mk9h.cn + * @description 蹇�掓煡璇� */ - wxNginxRequest (url, method, param) { - let _url = url - - if (!/^http/.test(url)) { - _url = window.GLOB.location + '/' + url - if (process.env.NODE_ENV === 'production') { - _url = document.location.origin + '/' + url - } - } - if (/qingqiumarket.cn|cloud.mk9h.cn/.test(_url)) { - _url = _url.replace('http://qingqiumarket.cn/', 'http://qingqiumarket.cn:8080/') - _url = _url.replace('http://cloud.mk9h.cn/', 'http://cloud.mk9h.cn:8080/') - _url = _url.replace('https://qingqiumarket.cn/', 'https://qingqiumarket.cn:8443/') - _url = _url.replace('https://cloud.mk9h.cn/', 'https://cloud.mk9h.cn:8443/') - } - - if (param) { - return axios({ - url: _url, - method, - data: param - }) - } - + expressRequest (url) { return axios({ - url: _url, - method + url: window.GLOB.location + '/' + url, + method: 'get' }) } @@ -1206,19 +1182,8 @@ * @description oss鏂囦欢涓婁紶 */ fileOssUpload (param) { - let _url = window.GLOB.location + '/file/oss/upload' - if (process.env.NODE_ENV === 'production') { - _url = document.location.origin + '/file/oss/upload' - } - if (/qingqiumarket.cn|cloud.mk9h.cn/.test(_url)) { - _url = _url.replace('http://qingqiumarket.cn/', 'http://qingqiumarket.cn:8080/') - _url = _url.replace('http://cloud.mk9h.cn/', 'http://cloud.mk9h.cn:8080/') - _url = _url.replace('https://qingqiumarket.cn/', 'https://qingqiumarket.cn:8443/') - _url = _url.replace('https://cloud.mk9h.cn/', 'https://cloud.mk9h.cn:8443/') - } - return axios({ - url: _url, + url: window.GLOB.location + '/file/oss/upload', method: 'post', headers: { 'Content-Type': 'multipart/form-data' }, data: param diff --git a/src/index.js b/src/index.js index f91f8c0..07da582 100644 --- a/src/index.js +++ b/src/index.js @@ -199,6 +199,7 @@ GLOB.host = window.location.host + (_service ? '_' + _service : '') GLOB.baseurl = document.location.origin + '/' + GLOB.service GLOB.linkurl = GLOB.baseurl + 'index.html' + GLOB.location = document.location.origin } else { GLOB.location = config.host GLOB.service = config.service diff --git a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx index e0676c2..9fa4831 100644 --- a/src/tabviews/custom/components/timeline/normal-timeline/index.jsx +++ b/src/tabviews/custom/components/timeline/normal-timeline/index.jsx @@ -417,7 +417,7 @@ this.setState({ loading: true }) - Api.wxNginxRequest(`express/${code}/${order}`, 'get').then(res => { + Api.expressRequest(`express/${code}/${order}`).then(res => { if (!res || typeof(res) !== 'string') { notification.error({ top: 92, -- Gitblit v1.8.0