Commit 06a1632c by 无尘

fix: 修改应用菜单

parent 608e886e
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2018-10-10 14:44:45
* @LastEditors: 无尘
* @LastEditTime: 2020-09-18 14:29:54
* @LastEditTime: 2020-09-18 14:59:25
-->
<template>
<div class="enterprise-wrap">
......@@ -85,6 +85,11 @@ export default {
getRoleMenu(para)
.then(async res => {
if (res.code == '0000') {
// 返回空数组
if (!res.result || !res.result.lenght) {
that.router.back();
return false;
}
// 这里考虑有子级情况,后端接口返回是一个一个的菜单,不是父子级
that.appMenuData = await that.treeData(JSON.parse(JSON.stringify(res.result)));
if (that.appMenuData[0] && !!that.appMenuData[0].children && !!that.appMenuData[0].children.length && !!that.appMenuData[0].children[0].children && !!that.appMenuData[0].children[0].children.length) {
......
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