Skip to content

Commit

Permalink
⚡ selectUser 支持根据userTypes,进行查询
Browse files Browse the repository at this point in the history
  • Loading branch information
Hccake committed Nov 20, 2020
1 parent a2b1210 commit b00a5f0
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions src/api/sys/sysuser.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { axios } from '@/utils/request'
import qs from 'qs'

export function getPage (query) {
return axios({
Expand All @@ -23,7 +24,6 @@ export function addObj (obj) {
})
}


export function putObj (obj) {
return axios({
url: '/sysuser',
Expand All @@ -32,51 +32,52 @@ export function putObj (obj) {
})
}


export function delObj (id) {
return axios({
url: '/sysuser/' + id,
method: 'delete'
})
}

export function getUserScope(userId) {
export function getUserScope (userId) {
return axios({
url: '/sysuser/scope/'+ userId,
url: '/sysuser/scope/' + userId,
method: 'get'
})
}

export function putUserScope(userId, userScope) {
export function putUserScope (userId, userScope) {
return axios({
url: '/sysuser/scope/'+ userId,
url: '/sysuser/scope/' + userId,
method: 'put',
data: userScope
})
}


export function changePassword(userId, params) {
export function changePassword (userId, params) {
return axios({
url: '/sysuser/pass/'+ userId,
url: '/sysuser/pass/' + userId,
method: 'put',
params: params
})
}

export function updateStatus(userIds, status) {
export function updateStatus (userIds, status) {
return axios({
url: '/sysuser/status/',
method: 'put',
params: {'status': status },
params: { 'status': status },
data: userIds
})
}


export function getSelectData() {
export function getSelectData (userTypesArr) {
return axios({
url: '/sysuser/select',
params: { userTypes: userTypesArr },
paramsSerializer: function (params) {
return qs.stringify(params, { arrayFormat: 'repeat' })
},
method: 'get'
})
}
}

0 comments on commit b00a5f0

Please sign in to comment.