基于vue3.0和element-plus的组件库
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { get, post, put, delate } from '../http/axios';
|
|
|
|
import { queryList, save, update, deleteById } from './base';
|
|
|
|
const root = 'user';
|
|
|
|
const pwdUrl = 'user/password';
|
|
|
|
|
|
|
|
export const list = (example) => {
|
|
|
|
return queryList(root, example);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const add = (user) => {
|
|
|
|
return save(root, user);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const updatePwd = (pwd) => {
|
|
|
|
return update(pwdUrl, pwd);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const set = (user) => {
|
|
|
|
return update(root, user);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const del = (user) => {
|
|
|
|
return deleteById(root, user.userId);
|
|
|
|
};
|
|
|
|
|
|
|
|
export const reset = (user) => {
|
|
|
|
return update(root + '/' + user.userId, {});
|
|
|
|
};
|