优化代码

This commit is contained in:
smallchill 2019-02-22 21:49:38 +08:00
parent 30cfb38ffb
commit 3c1a8972f9
9 changed files with 37 additions and 57 deletions

View File

@ -4,10 +4,11 @@ export const getList = (current, size, params) => {
return request({
url: 'api/blade-desk/notice/list',
method: 'get',
params: Object.assign(params, {
params: {
...params,
current,
size,
})
}
})
}
@ -15,11 +16,8 @@ export const remove = (ids) => {
return request({
url: 'api/blade-desk/notice/remove',
method: 'post',
data: {
params: {
ids,
},
meta: {
isSerialize: true,
}
})
}

View File

@ -4,21 +4,19 @@ export const getList = (current, size, params) => {
return request({
url: 'api/blade-system/dept/list',
method: 'get',
params: Object.assign(params, {
params: {
...params,
current,
size
})
size,
}
})
}
export const remove = (ids) => {
return request({
url: 'api/blade-system/dept/remove',
method: 'post',
data: {
params: {
ids,
},
meta: {
isSerialize: true,
}
})
}

View File

@ -4,21 +4,19 @@ export const getList = (current, size, params) => {
return request({
url: 'api/blade-system/dict/list',
method: 'get',
params: Object.assign(params, {
params: {
...params,
current,
size
})
size,
}
})
}
export const remove = (ids) => {
return request({
url: 'api/blade-system/dict/remove',
method: 'post',
data: {
params: {
ids,
},
meta: {
isSerialize: true,
}
})
}

View File

@ -4,21 +4,19 @@ export const getList = (current, size, params) => {
return request({
url: 'api/blade-system/menu/list',
method: 'get',
params: Object.assign(params, {
params: {
...params,
current,
size
})
size,
}
})
}
export const remove = (ids) => {
return request({
url: 'api/blade-system/menu/remove',
method: 'post',
data: {
params: {
ids,
},
meta: {
isSerialize: true,
}
})
}

View File

@ -4,21 +4,19 @@ export const getList = (current, size, params) => {
return request({
url: 'api/blade-system/param/list',
method: 'get',
params: Object.assign(params, {
params: {
...params,
current,
size
})
size,
}
})
}
export const remove = (ids) => {
return request({
url: 'api/blade-system/param/remove',
method: 'post',
data: {
params: {
ids,
},
meta: {
isSerialize: true,
}
})
}

View File

@ -4,10 +4,11 @@ export const getList = (current, size, params) => {
return request({
url: 'api/blade-system/role/list',
method: 'get',
params: Object.assign(params, {
params: {
...params,
current,
size
})
size,
}
})
}
export const getTree = () => {
@ -21,12 +22,9 @@ export const grant = (roleIds, menuIds) => {
return request({
url: 'api/blade-system/role/grant',
method: 'post',
data: {
params: {
roleIds,
menuIds
},
meta: {
isSerialize: true,
}
})
}
@ -35,11 +33,8 @@ export const remove = (ids) => {
return request({
url: 'api/blade-system/role/remove',
method: 'post',
data: {
params: {
ids,
},
meta: {
isSerialize: true,
}
})
}

View File

@ -13,10 +13,11 @@ export const getList = (current, size, params) => {
return request({
url: 'api/blade-user/list',
method: 'get',
params: Object.assign(params, {
params: {
...params,
current,
size
})
size,
}
})
}
export const remove = (ids) => {

View File

@ -15,7 +15,7 @@ export const build = (ids) => {
return request({
url: 'api/blade-develop/code/gen-code',
method: 'post',
data: {
params: {
ids,
}
})
@ -24,11 +24,8 @@ export const remove = (ids) => {
return request({
url: 'api/blade-develop/code/remove',
method: 'post',
data: {
params: {
ids,
},
meta: {
isSerialize: true,
}
})
}

View File

@ -4,13 +4,10 @@ import {baseUrl} from '@/config/env';
export const loginByUsername = (account, password, type) => request({
url: 'api/blade-auth/token',
method: 'post',
data: {
params: {
account,
password,
type
},
meta: {
isSerialize: true,
}
})