diff --git a/index.js b/index.js index 7aa06c1..327d03e 100644 --- a/index.js +++ b/index.js @@ -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