diff --git a/src/core/helpers/protocol/route.js b/src/core/helpers/protocol/route.js index 230793297353979a1c240ce0861ab5dd62625806..e27b4ae6f0a0738fb1f410f246c45e41ca309eab 100644 --- a/src/core/helpers/protocol/route.js +++ b/src/core/helpers/protocol/route.js @@ -1,24 +1,5 @@ import getRealRoute from '../get-real-route' -function encodeQueryString (url) { - if (typeof url === 'string') { - const urls = url.split('?') - - url = urls[0] - - const params = []; - (urls[1] || '').split('&').forEach(function (pair) { - if (pair) { - const pairs = pair.split('=') - params.push(pairs[0] + '=' + encodeURIComponent(pairs[1])) - } - }) - - return params.length ? url + '?' + params.join('&') : url - } - return url -} - function createValidator (type) { return function validator (url, params) { // 格式化为绝对路径路由 @@ -55,9 +36,6 @@ function createValidator (type) { if (routeOptions.meta.isEntry) { url = url.replace(routeOptions.alias, '/') } - - // 参数格式化 - params.url = encodeQueryString(url) } }