| | |
| | | getRouters().then(res => { |
| | | const sdata = JSON.parse(JSON.stringify(res.data)) |
| | | const rdata = JSON.parse(JSON.stringify(res.data)) |
| | | let indexdata = res.data[0].path + "/" + res.data[0].children[0].path |
| | | if (res.data[0].children[0].query !== undefined) { //如果当前路由存在路由参数,则带入 |
| | | let indexdata = '' |
| | | if(res.data && res.data[0].children){ |
| | | indexdata = res.data[0].path + "/" + res.data[0].children[0].path |
| | | }else { |
| | | indexdata = res.data[0].path + "/" |
| | | } |
| | | |
| | | |
| | | if (res.data[0].children && res.data[0].children[0].query !== undefined) { //如果当前路由存在路由参数,则带入 |
| | | let query = JSON.parse(res.data[0].children[0].query); |
| | | let temp = ''; |
| | | for (var val in query) { |