mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-11 11:56:44 +08:00
建立自己的一个分支
This commit is contained in:
@@ -5,6 +5,18 @@ export const deepCopy = (obj) => {
|
||||
return JSON.parse(JSON.stringify(obj));
|
||||
};
|
||||
|
||||
/**文件的基础路径*/
|
||||
export function getFileBaseUrl() {
|
||||
const protocol='https:'==window.location.protocol;
|
||||
let configPath=process.env.VUE_APP_FILE_BASE_URL;
|
||||
if(configPath.startsWith('http')){
|
||||
return configPath;
|
||||
}else{
|
||||
let domain = window.location.host;
|
||||
return protocol+='//'+domain+configPath;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取url协议
|
||||
* @param {Object} type
|
||||
@@ -207,8 +219,8 @@ export function testType(type) { //此方法移到tools中
|
||||
|
||||
/**
|
||||
* 头像文字
|
||||
* @param {*} text
|
||||
* @returns
|
||||
* @param {*} text
|
||||
* @returns
|
||||
*/
|
||||
export function userAvatarText(text){
|
||||
if(text){
|
||||
|
||||
Reference in New Issue
Block a user