cool-admin-vue/cool/modules/base/service/common.js
2021-02-28 22:24:54 +08:00

81 lines
1.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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;