From cf5ac359eefb1c308fd7852743398a7bf45ad99a Mon Sep 17 00:00:00 2001 From: caishi <1149225589@qq.com> Date: Wed, 16 Jun 2021 09:47:52 +0800 Subject: [PATCH] =?UTF-8?q?eudocderforge=E5=A4=B4=E5=83=8Furl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/common/UrlTool.js | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/common/UrlTool.js b/src/common/UrlTool.js index 964c35488..13ad2d2f9 100644 --- a/src/common/UrlTool.js +++ b/src/common/UrlTool.js @@ -8,12 +8,18 @@ const isDev = window.location.port == 3007; const isdev2= window.location.hostname ==='www.educoder.net' export const TEST_HOST = "https://testforgeplus.trustie.net/" export function getImageUrl(path) { - // https://www.educoder.net - // https://testbdweb.trustie.net - // const local = 'http://localhost:3000' - const local = 'https://testforgeplus.trustie.net'; - if (isDev) { - return `${local}/${path}` + const local = 'https://testforgeplus.educoder.net'; + const normal = 'https://ali-cdn.educoder.net/images'; + const normalend = 'https://ali-cdn.educoder.net'; + if(path.substr(0, 7) !== "/system"){ + if (isDev) { + return `${local}/${path}` + } + if(path.substr(0, 7) !== "/images"){ + return `${normal}${path}`; + }else{ + return `${normalend}${path}`; + } } return `${path}`; }