mirror of
https://gitee.com/ZhongBangKeJi/crmeb_java.git
synced 2026-04-23 20:08:35 +08:00
v1.1
1、提货点 2、客服(腾讯云智服) 3、接口权限控制 4、复制第三方商品可配置 4、优化附件上传配置 5、手机端核销订单 6、手机端订单统计、订单管理 7、短信优化 8、订阅消息全自动化
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { asyncRoutes, constantRoutes } from '@/router'
|
||||
import * as categoryApi from '@/api/categoryApi.js'
|
||||
import * as roleApi from '@/api/roleApi.js'
|
||||
import * as Auth from '@/libs/wechat';
|
||||
|
||||
/**
|
||||
* Use meta.role to determine if the current user has permission
|
||||
@@ -61,12 +62,13 @@ const actions = {
|
||||
generateRoutes({ commit }, roleid) {
|
||||
return new Promise(async resolve => {
|
||||
let accessedRoutes = []
|
||||
let menus= []
|
||||
const { rules } = await roleApi.getRoleById(roleid)
|
||||
// const menus = await categoryApi.categroyByIds({ ids: rules })
|
||||
const menus = await roleApi.menuListApi()
|
||||
const menusAll = await roleApi.menuListApi()
|
||||
!Auth.isPhone() ? menus = menusAll.filter(item => item.url !== '/javaMobile') : menus = menusAll.filter(item => item.url === '/javaMobile')
|
||||
const _routerResult = comRouter(menus, asyncRoutes)
|
||||
accessedRoutes = filterAsyncRoutes(_routerResult, rules)
|
||||
console.log(accessedRoutes)
|
||||
// todo 这里控制是否过滤路由,经测试有些菜单不能予以设置,比如系统设置等等
|
||||
commit('SET_ROUTES', menus)
|
||||
// resolve(menus)
|
||||
|
||||
Reference in New Issue
Block a user