zhouwx
2025-01-06 c3bb35b20d6e076f73a1cad50fd6b9b94ca399a7
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) {