user.service.js 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /**
  2. * 这是用户业务逻辑的服务
  3. */
  4. export default class UserService {
  5. constructor(AjaxService) {
  6. Object.assign(this, { AjaxService })
  7. this.name = 'UserService'
  8. }
  9. /* 初始化查询用户是否为正常用户 */
  10. appSelectLoginUser (data = {}) {
  11. return this.AjaxService.post({ url:'', data, isLoading: true })
  12. }
  13. /**
  14. * 账号登录
  15. * @param mobileOrEmail 邮箱或手机
  16. * @param password 密码
  17. * @param source 来源 PC与小程序传:'www'crm就传'crm'
  18. */
  19. AorganizationLogin (data = {}) {
  20. return this.AjaxService.post({ url:'/user/login', data, isLoading: true })
  21. }
  22. /**
  23. * @机构-地址列表
  24. * @param:userId 用户ID(必传),
  25. * @param:pageNum 页码
  26. * @param:pageSize 每页条数
  27. */
  28. QueryAddressList (data = {}) {
  29. return this.AjaxService.get({ url:'/personalCenter/findAddress', data, isLoading: true })
  30. }
  31. /**
  32. * @机构-添加&&修改地址
  33. * @param:userId 用户ID(必传),
  34. * @param:地址信息,
  35. */
  36. AddNewAddress (data = {}) {
  37. return this.AjaxService.post({ url:'/personalCenter/saveAddress', data, isLoading: true })
  38. }
  39. /**
  40. * @机构-删除地址
  41. * @param:userId 用户ID(必传),
  42. * @param:地址信息,
  43. */
  44. DeleteNewAddress (data = {}) {
  45. return this.AjaxService.get({ url:'/personalCenter/deleteAddress', data, isLoading: true })
  46. }
  47. /**
  48. * @机构-个人中心
  49. * @param:userId 用户ID(必传),
  50. */
  51. PersonalInfo (data = {}) {
  52. return this.AjaxService.get({ url:'/personalCenter/myCentre', data, isLoading: true })
  53. }
  54. /* 运营人员管理-列表 */
  55. QueryOperatorList (data = {}) {
  56. return this.AjaxService.get({ url:'/operation/list', data, isLoading: true })
  57. }
  58. /* 运营人员管理-添加 */
  59. PostAddOperator (data = {}) {
  60. return this.AjaxService.post({ url:'/operation/add', data, isLoading: true })
  61. }
  62. /* 运营人员管理-删除 */
  63. PostDeleteOperator (data = {}) {
  64. return this.AjaxService.post({ url:'/operation/delete', data, isLoading: true })
  65. }
  66. /* 运营人员管理-更新邀请码 */
  67. PostUpdateOperatorCode (data = {}) {
  68. return this.AjaxService.post({ url:'/operation/updateInvitationCode', data, isLoading: true })
  69. }
  70. }