Commit f43e17b6 authored by 张俊's avatar 张俊

apaas菜单

parent a54c7392
......@@ -138,11 +138,11 @@ export default {
getUserInfo() {
return this.$axios.get(`/apaas/system/v5/user/getUserInfo`);
},
getMenu() {
return this.$axios.get(`/apaas/system/v5/menu/user/tree`);
getMenu(search) {
return this.$axios.get(`/apaas/system/v5/menu/user/tree?search=${search}`);
},
getUser() {
Promise.all([this.getUserInfo(), this.getMenu()]).then((res) => {
Promise.all([this.getUserInfo(), this.getMenu('apaas')]).then((res) => {
if (res[0].data.code == 200 && res[1].data.code == 200) {
let data = res[1].data.data[0].children || [];
this.$store.commit("setUserInfo", res[0].data.data);
......
......@@ -44,8 +44,8 @@ function getUser() {
}
//获取用户菜单信息
function getMenu() {
return axios.get(`/apaas/system/v5/menu/user/tree`)
function getMenu(search) {
return axios.get(`/apaas/system/v5/menu/user/tree?search=${search}`)
}
//处理菜单成为对象
......@@ -60,7 +60,7 @@ function getMenuObj(menu,parentRowPath,menuObj){
}
Promise.all([getUser(),getMenu()]).then(res => {
Promise.all([getUser(),getMenu('apaas')]).then(res => {
console.log(res);
if (res[0].data.code == 200&&res[1].data.code == 200) {
//已登录则记录菜单和用户信息
......
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