zhouwx
2024-06-11 bb677211fa6a0916869eb264ba047aa88a8181be
src/store/modules/permission.js
@@ -40,8 +40,15 @@
        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) {