Commit 6103bbc6 by ZhengJie

[代码完善](v2.5): v2.5 修复创建角色后点击角色报错的Bug

parent a9b2332f
...@@ -9,7 +9,7 @@ export function getDepts(params) { ...@@ -9,7 +9,7 @@ export function getDepts(params) {
} }
export function getDeptSuperior(ids) { export function getDeptSuperior(ids) {
const data = ids.length !== null ? ids : Array.of(ids) const data = ids.length || ids.length === 0 ? ids : Array.of(ids)
return request({ return request({
url: 'api/dept/superior', url: 'api/dept/superior',
method: 'post', method: 'post',
......
...@@ -16,7 +16,8 @@ export function getMenus(params) { ...@@ -16,7 +16,8 @@ export function getMenus(params) {
} }
export function getMenuSuperior(ids) { export function getMenuSuperior(ids) {
const data = ids.length !== null ? ids : Array.of(ids) console.log(ids.length)
const data = ids.length || ids.length === 0 ? ids : Array.of(ids)
return request({ return request({
url: 'api/menus/superior', url: 'api/menus/superior',
method: 'post', method: 'post',
......
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