用户头像http(s)链接支持

This commit is contained in:
RuoYi
2024-11-22 14:10:15 +08:00
parent 4c013a4f73
commit 32f0636d46
4 changed files with 34 additions and 11 deletions

View File

@@ -1,4 +1,26 @@
/**
* 判断value字符串是否为空
* @param {string} value
* @returns {Boolean}
*/
export function isEmpty(value) {
if (value == null || value == "" || value == undefined || value == "undefined") {
return true;
}
return false;
}
/**
* 判断url是否是http或https
* @param {string} url
* @returns {Boolean}
*/
export function isHttp(url) {
return url.indexOf('http://') !== -1 || url.indexOf('https://') !== -1
}
/**
* 判断path是否为外链
* @param {string} path
* @returns {Boolean}
*/