mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
先提交保留一下
This commit is contained in:
@@ -7,14 +7,16 @@ export const deepCopy = (obj) => {
|
||||
|
||||
/**文件的基础路径*/
|
||||
export function getFileBaseUrl() {
|
||||
const protocol='https:'==window.location.protocol;
|
||||
let protocol=window.location.protocol;
|
||||
let configPath=process.env.VUE_APP_FILE_BASE_URL;
|
||||
let baseUrl='';
|
||||
if(configPath.startsWith('http')){
|
||||
return configPath;
|
||||
baseUrl = configPath;
|
||||
}else{
|
||||
let domain = window.location.host;
|
||||
return protocol+='//'+domain+configPath;
|
||||
baseUrl = protocol+'//'+domain+configPath;
|
||||
}
|
||||
return baseUrl;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user