建立自己的一个分支

This commit is contained in:
daihh
2022-06-02 22:27:43 +08:00
parent cee51f3aba
commit 5b9ce7fa75
3 changed files with 16 additions and 4 deletions

View File

@@ -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){