优化多个地方
This commit is contained in:
@@ -21,4 +21,21 @@ export function cvtR2Url(key) {
|
||||
domain = domain.slice(0, -1);
|
||||
}
|
||||
return domain + '/' + key
|
||||
}
|
||||
}
|
||||
|
||||
export function toOssDomain(domain) {
|
||||
|
||||
if (!domain) {
|
||||
return null
|
||||
}
|
||||
|
||||
if (!domain.startsWith('http')) {
|
||||
return 'https://' + domain
|
||||
}
|
||||
|
||||
if (domain.endsWith("/")) {
|
||||
domain = domain.slice(0, -1);
|
||||
}
|
||||
|
||||
return domain
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user