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.

29 lines
523 B

8 months ago
  1. import Mock from 'mockjs'
  2. // 登录
  3. export function login () {
  4. return {
  5. // isOpen: false,
  6. url: '/sys/login',
  7. type: 'post',
  8. data: {
  9. 'msg': 'success',
  10. 'code': 0,
  11. 'expire': Mock.Random.natural(60 * 60 * 1, 60 * 60 * 12),
  12. 'token': Mock.Random.string('abcdefghijklmnopqrstuvwxyz0123456789', 32)
  13. }
  14. }
  15. }
  16. // 退出
  17. export function logout () {
  18. return {
  19. // isOpen: false,
  20. url: '/sys/logout',
  21. type: 'post',
  22. data: {
  23. 'msg': 'success',
  24. 'code': 0
  25. }
  26. }
  27. }