user.service.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 ,isStatus: 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: false })
  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. /* 供应商资料信息-数据回显 */
  87. SupplierShopInfo (data = {}) {
  88. return this.AjaxService.get({ url:'/supplier/shopInfo', data, isLoading: true })
  89. }
  90. /* 供应商资料信息-提交修改 */
  91. SupplierModifiedData (data = {}) {
  92. return this.AjaxService.post({ url:'/supplier/modifiedData', data, isLoading: true })
  93. }
  94. /* 供应商修改申请信息保存 */
  95. SupplierUpdateCompanyInfo (data = {}) {
  96. return this.AjaxService.post({ url:'/supplier/updateCompanyInfo', data, isLoading: true })
  97. }
  98. }