cool-admin-vue/cool/modules/base/service/open.js

57 lines
874 B
JavaScript
Raw Normal View History

2021-02-28 01:55:04 +08:00
import { BaseService, Service } from "cl-admin";
@Service("open")
class Open extends BaseService {
/**
* 用户登录
*
* @param {*} { username, password, captchaId, verifyCode }
* @returns
* @memberof CommonService
*/
userLogin({ username, password, captchaId, verifyCode }) {
return this.request({
url: "/login",
method: "POST",
data: {
username,
password,
captchaId,
verifyCode
}
});
}
/**
* 图片验证码 svg
*
* @param {*} { height, width }
* @returns
* @memberof CommonService
*/
captcha({ height, width }) {
return this.request({
url: "/captcha",
params: {
height,
width
}
});
}
/**
* 刷新 token
* @param {string} token
*/
refreshToken(token) {
return this.request({
url: "/refreshToken",
params: {
refreshToken: token
}
});
}
}
export default Open;