diff --git a/index.js b/index.js index f286f53..4b1fe2c 100644 --- a/index.js +++ b/index.js @@ -62,7 +62,7 @@ module.exports = { makeServerUrl(route = '') { if (typeof route !== 'string') route = '' // 防止 route 为 null, undefined 等由于后台数据库默认值而造成的异常。 - route.replace('\\', '/') + route = route.replace('\\', '/') if (/^https?:\/\//.test(route)) { return route }