Browse Source

加入路由拦截器并判断string参数值的长度不能超过33

master
蟑螂恶霸 3 years ago
parent
commit
8b3afdc6dc
  1. 4
      src/common/globalRouter.js

4
src/common/globalRouter.js

@ -33,7 +33,7 @@ $globalRouter.beforeEach((to, from, next) => {
} }
} else { } else {
if (to.query[key].toString().length > 33) { if (to.query[key].toString().length > 33) {
to.query[key] = 0; to.query[key] = "";
} }
} }
} }
@ -47,7 +47,7 @@ $globalRouter.beforeEach((to, from, next) => {
} }
} else { } else {
if (to.params[key].toString().length > 33) { if (to.params[key].toString().length > 33) {
to.params[key] = 0; to.params[key] = "";
} }
} }
} }

Loading…
Cancel
Save