login.js 714 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. import { BaseService, Service } from '@/cool/index';
  2. @Service('sys/login')
  3. export class LoginService extends BaseService {
  4. /**
  5. * 用户登录
  6. *
  7. * @param {*} { username, password, captchaId, verifyCode }
  8. * @returns
  9. * @memberof CommonService
  10. */
  11. login({ username, password, captchaId, verifyCode }) {
  12. return this.request({
  13. url: '/login',
  14. method: 'POST',
  15. data: {
  16. username,
  17. password,
  18. captchaId,
  19. verifyCode
  20. }
  21. });
  22. }
  23. /**
  24. * 退出登录
  25. */
  26. logout() {
  27. return this.request({
  28. url: '/logout',
  29. method: 'POST'
  30. });
  31. }
  32. /**
  33. * 权限信息
  34. *
  35. * @returns
  36. * @memberof CommonService
  37. */
  38. permMenu() {
  39. return this.request({
  40. url: '/comm/permmenu'
  41. });
  42. }
  43. }