user.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. import request from '../index'
  2. /**
  3. * 获取用户大会员、超级订阅权限等信息
  4. * @type {post}
  5. */
  6. export function ajaxGetUserPower() {
  7. return request({
  8. url: '/bigmember/use/isAdd',
  9. method: 'post'
  10. })
  11. }
  12. /**
  13. * 获取用户头像、昵称等信息
  14. * @type {post}
  15. */
  16. export function ajaxGetUserInfo() {
  17. return request({
  18. url: '/jypay/user/getSimpleData',
  19. method: 'post'
  20. })
  21. }
  22. /**
  23. * 退出登录
  24. * @type {post}
  25. * @param data
  26. */
  27. export function ajaxSetSignOut(data) {
  28. return request({
  29. url: '/front/signOut',
  30. method: 'post',
  31. data
  32. })
  33. }
  34. /**
  35. * 检查是否登录状态
  36. * @type {post}
  37. * @param data
  38. */
  39. export function ajaxCheckUserLoginStatus(data) {
  40. return request({
  41. url: '/front/hasSign',
  42. method: 'post',
  43. data
  44. })
  45. }
  46. /**
  47. * 获取用户身份列表
  48. * @type {post}
  49. */
  50. export function ajaxGetIdentityList() {
  51. return request({
  52. url: '/publicapply/identity/list',
  53. method: 'post'
  54. })
  55. }
  56. /**
  57. * 根据Token切换用户身份
  58. * @type {post}
  59. * @param data.token - 选中身份对应的Token
  60. */
  61. export function ajaxSwitchIdentity(data) {
  62. return request({
  63. url: '/publicapply/identity/switch',
  64. method: 'post',
  65. headers: {
  66. 'Content-Type': 'multipart/form-data'
  67. },
  68. data
  69. })
  70. }