This commit is contained in:
陆柯 2021-09-24 16:07:32 +08:00
parent 3a28b3405d
commit 7bbcf69fe5

View File

@ -69,9 +69,7 @@ module.exports = {
// },
makeServerUrl(route = '') {
if (route && typeof route === 'object') {
route = `${route.api}/${route.class}/${route.method}`
}
if (typeof route !== 'string') route = '' // 防止 route 为 null, undedefined 等由于后台数据库默认值而造成的异常。
if (/^https?:\/\//.test(route)) {
return route