u
This commit is contained in:
parent
3a28b3405d
commit
7bbcf69fe5
4
index.js
4
index.js
@ -69,9 +69,7 @@ module.exports = {
|
|||||||
// },
|
// },
|
||||||
|
|
||||||
makeServerUrl(route = '') {
|
makeServerUrl(route = '') {
|
||||||
if (route && typeof route === 'object') {
|
if (typeof route !== 'string') route = '' // 防止 route 为 null, undedefined 等由于后台数据库默认值而造成的异常。
|
||||||
route = `${route.api}/${route.class}/${route.method}`
|
|
||||||
}
|
|
||||||
|
|
||||||
if (/^https?:\/\//.test(route)) {
|
if (/^https?:\/\//.test(route)) {
|
||||||
return route
|
return route
|
||||||
|
Loading…
Reference in New Issue
Block a user