Commit 6c34a2b3 authored by 李鹏 's avatar 李鹏

验证码校验

parent 7cb62d64
...@@ -242,7 +242,7 @@ export default { ...@@ -242,7 +242,7 @@ export default {
pathToUrl(item, parent) { pathToUrl(item, parent) {
//判断是否是新窗口打开 //判断是否是新窗口打开
if (item.new_window) { if (item.new_window) {
window.open(item.path, "_blank"); window.open(item.sourcePath ? item.sourcePath : item.path, "_blank");
} else { } else {
// 当前窗口打开 // 当前窗口打开
if (item.path.indexOf("#") > -1) { if (item.path.indexOf("#") > -1) {
......
...@@ -166,7 +166,7 @@ const getUser = () => { ...@@ -166,7 +166,7 @@ const getUser = () => {
store.commit("setMenuObj", menuObj); store.commit("setMenuObj", menuObj);
// } // }
generateRoutes(); generateRoutes();
router.push("/"); router.push("/forewarning/list");
} }
}); });
}; };
......
...@@ -278,7 +278,10 @@ function getViews(path) { ...@@ -278,7 +278,10 @@ function getViews(path) {
var menuToRouter = (menu) => { var menuToRouter = (menu) => {
menu.forEach((e) => { menu.forEach((e) => {
e.name = getName(e.path); e.name = getName(e.path);
if (e.path.indexOf("#") != -1 && e.new_window !== 1) { if (e.path.indexOf("#") != -1) {
if (e.path.indexOf("http") === 0) {
e.sourcePath = e.path;
}
e.path = e.path.split("#")[1]; e.path = e.path.split("#")[1];
} }
if (e.children && e.menuType == 0) { if (e.children && e.menuType == 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment