user.service.js 2.7 KB

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