mirror of
https://github.com/cool-team-official/cool-admin-vue.git
synced 2024-11-01 22:20:27 +08:00
81 lines
1.0 KiB
JavaScript
81 lines
1.0 KiB
JavaScript
|
import { BaseService, Service } from "cl-admin";
|
|||
|
|
|||
|
@Service("comm")
|
|||
|
class Common extends BaseService {
|
|||
|
/**
|
|||
|
* 文件上传模式
|
|||
|
*/
|
|||
|
uploadMode() {
|
|||
|
return this.request({
|
|||
|
url: "/uploadMode"
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
/**
|
|||
|
* 文件上传,如果模式是 cloud,返回对应参数
|
|||
|
*
|
|||
|
* @returns
|
|||
|
* @memberof CommonService
|
|||
|
*/
|
|||
|
upload(params) {
|
|||
|
return this.request({
|
|||
|
url: "/upload",
|
|||
|
method: "POST",
|
|||
|
params
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
/**
|
|||
|
* 用户退出
|
|||
|
*/
|
|||
|
userLogout() {
|
|||
|
return this.request({
|
|||
|
url: "/logout",
|
|||
|
method: "POST"
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
/**
|
|||
|
* 用户信息
|
|||
|
*
|
|||
|
* @returns
|
|||
|
* @memberof CommonService
|
|||
|
*/
|
|||
|
userInfo() {
|
|||
|
return this.request({
|
|||
|
url: "/person"
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
/**
|
|||
|
* 用户信息修改
|
|||
|
*
|
|||
|
* @param {*} params
|
|||
|
* @returns
|
|||
|
* @memberof CommonService
|
|||
|
*/
|
|||
|
userUpdate(params) {
|
|||
|
return this.request({
|
|||
|
url: "/personUpdate",
|
|||
|
method: "POST",
|
|||
|
data: {
|
|||
|
...params
|
|||
|
}
|
|||
|
});
|
|||
|
}
|
|||
|
|
|||
|
/**
|
|||
|
* 权限信息
|
|||
|
*
|
|||
|
* @returns
|
|||
|
* @memberof CommonService
|
|||
|
*/
|
|||
|
permMenu() {
|
|||
|
return this.request({
|
|||
|
url: "/permmenu"
|
|||
|
});
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
export default Common;
|