|
@@ -45,9 +45,15 @@ const getUser = debounce(keyName => {
|
|
|
}
|
|
|
// 按昵称查
|
|
|
if (state.type === 'name') {
|
|
|
- searchUserByName({keyName}).then(res => {
|
|
|
- state.list = res.data.records
|
|
|
- }).finally(() => state.loading = false)
|
|
|
+ if (props.admin) {
|
|
|
+ searchAdmin({keyName}).then(res => {
|
|
|
+ state.list = res.data
|
|
|
+ }).finally(() => state.loading = false)
|
|
|
+ } else {
|
|
|
+ searchUserByName({keyName}).then(res => {
|
|
|
+ state.list = res.data.records
|
|
|
+ }).finally(() => state.loading = false)
|
|
|
+ }
|
|
|
}
|
|
|
} else {
|
|
|
state.list = []
|