role.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. const tokens = {
  2. admin: {
  3. token: 'admin-token'
  4. },
  5. editor: {
  6. token: 'editor-token'
  7. }
  8. }
  9. const users = {
  10. 'admin-token': {
  11. roles: ['admin'],
  12. introduction: 'I am a super administrator',
  13. avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
  14. name: 'Super Admin'
  15. },
  16. 'editor-token': {
  17. roles: ['editor'],
  18. introduction: 'I am an editor',
  19. avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
  20. name: 'Normal Editor'
  21. }
  22. }
  23. module.exports = [
  24. // role-lest
  25. {
  26. url: '/vue-element-admin/role/getRoles',
  27. type: 'get',
  28. response: _ => {
  29. return {
  30. code: 0,
  31. message: 'ok',
  32. data: {
  33. current_page: 1,
  34. data: [
  35. { id: 1, role_name: '管理猿', create_time: '2016-05-11 03:06:16', status: 0 },
  36. { id: 2, role_name: '运营猿', create_time: '2016-05-11 03:06:16', status: 0 },
  37. { id: 3, role_name: '低级管理猿', create_time: '2016-05-11 03:06:16', status: 0 }
  38. ],
  39. from: 0,
  40. last_page: 1,
  41. per_page: 10,
  42. to: 3,
  43. total: 3
  44. }
  45. }
  46. }
  47. }
  48. ]