| | |
| | | |
| | | const getAppMenuList = async (id) => { |
| | | const data = await AppApi.getAppMenuList(id) |
| | | console.log(data) |
| | | |
| | | let userInfo = wsCache.get(CACHE_KEY.USER) |
| | | let routers = wsCache.get(CACHE_KEY.ROLE_ROUTERS) |
| | | console.log(userInfo) |
| | | console.log(routers) |
| | | userInfo.menus = data |
| | | wsCache.set(CACHE_KEY.USER, userInfo) |
| | | wsCache.set(CACHE_KEY.ROLE_ROUTERS, data) |
| | |
| | | const gotoApp = async (item) => { |
| | | let id = item.id |
| | | let type = item.type |
| | | console.log(type) |
| | | if(type === 0) { |
| | | getAppMenuList(id) |
| | | } else { |
| | | const data = await AppApi.getAppMenuList(id) |
| | | let userInfo = wsCache.get(CACHE_KEY.USER) |
| | | userInfo.menus = data |
| | | wsCache.set(CACHE_KEY.USER, userInfo) |
| | | wsCache.set(CACHE_KEY.ROLE_ROUTERS, data) |
| | | // await OAuth2Login(formData.value) |
| | | window.open(item.appDomain + '/login?appid=' + item.id + "&username=" + authUtil.getLoginForm().username, '_blank') |
| | | // window.open(item.appDomain + '/login?appid=' + item.id + "&username=" + authUtil.getLoginForm().username, '_blank') |
| | | window.open(item.appDomain + '/index', '_blank') |
| | | } |
| | | } |
| | | |