user photo src

This commit is contained in:
caishi 2023-09-04 10:07:58 +08:00
parent 042b9a88fb
commit f688d44455
1 changed files with 3 additions and 3 deletions

View File

@ -10,14 +10,14 @@ export const TEST_HOST = window.location.hostname ==="testforgeplus.educoder.net
export function getImageUrl(path) {
const local = 'https://testforgeplus.educoder.net';
const normal = TEST_HOST ? "https://new-testali-cdn.educoder.net/images" : 'https://ali-cdn.educoder.net/images';
const normalend = TEST_HOST ? 'https://new-testali-cdn.educoder.net' :'https://ali-cdn.educoder.net';
// const normal = TEST_HOST ? "https://new-testali-cdn.educoder.net/images" : 'https://ali-cdn.educoder.net/images';
const normalend = TEST_HOST ? 'https://testforgeplus.educoder.net/' :'https://ali-cdn.educoder.net';
if (isDev) {
return `${local}/${path}`;
}
if(path.substr(0, 7) !== "/system"){
if(path.substr(0, 7) !== "/images"){
return `${normal}${path}`;
return `/${path}`;
}else{
return `${normalend}${path}`;
}