eudocderforge头像url

This commit is contained in:
caishi 2021-06-16 09:47:52 +08:00
parent 5cc7f51505
commit cf5ac359ee
1 changed files with 12 additions and 6 deletions

View File

@ -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}`;
}