user.service.js 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. /**
  2. * 这是用户业务逻辑的服务
  3. */
  4. export default class UserService {
  5. constructor(AjaxService) {
  6. Object.assign(this, { AjaxService })
  7. this.name = 'UserService'
  8. }
  9. /* 初始化授权登录 */
  10. UserLoginAuthApplets (data = {}) {
  11. return this.AjaxService.post({
  12. // url: '/club/authorization',
  13. url: '/user/login/auth/applets',
  14. data,
  15. isLoading: false,
  16. isStatus: true,
  17. isHost:true
  18. })
  19. }
  20. /* 普通机构注册 */
  21. UserRegisterClub (data = {}) {
  22. return this.AjaxService.post({
  23. url:'/user/register/club',
  24. data,
  25. isLoading: true,
  26. isHost:true
  27. })
  28. }
  29. /* 供应商注册 */
  30. SupplierAppletsRegistered (data = {}) {
  31. return this.AjaxService.post({
  32. url:'/user/register/shop',
  33. data,
  34. isLoading: true,
  35. isHost:true
  36. })
  37. }
  38. /**
  39. * 账号登录
  40. * @param mobileOrEmail 邮箱或手机
  41. * @param password 密码
  42. * @param source 来源 PC与小程序传:'www'crm就传'crm'
  43. */
  44. AorganizationLogin (data = {}) {
  45. return this.AjaxService.post({
  46. url:'/user/login/password',
  47. data,
  48. isLoading: true ,
  49. isStatus: true,
  50. isHost:true
  51. })
  52. }
  53. /* 查询机构资料*/
  54. OrganizationUpdateModifyInfo (data = {}) {
  55. return this.AjaxService.get({
  56. url:'/user/club/info',
  57. data,
  58. isLoading: true,
  59. isHost:true
  60. })
  61. }
  62. /* 机构升级会员机构 */
  63. OrganizationRegister (data = {}) {
  64. return this.AjaxService.post({
  65. url:'/user/register/club/upgrade',
  66. data,
  67. isLoading: true,
  68. isHost:true
  69. })
  70. }
  71. /* 机构提交资料修改 */
  72. OrganizationUpdate (data = {}) {
  73. return this.AjaxService.post({
  74. url:'/user/club/info/update',
  75. data,
  76. isLoading: true,
  77. isHost:true
  78. })
  79. }
  80. /* 供应商资料信息-数据回显 */
  81. SupplierShopInfo (data = {}) {
  82. return this.AjaxService.get({
  83. url:'/user/shop/info',
  84. data,
  85. isLoading: true,
  86. isHost:true
  87. })
  88. }
  89. /* 供应商修改申请信息保存 */
  90. SupplierUpdateCompanyInfo (data = {}) {
  91. return this.AjaxService.post({
  92. url:'/user/register/shop/apply',
  93. data,
  94. isLoading: true,
  95. isHost:true
  96. })
  97. }
  98. /* 供应商资料信息-提交修改 */
  99. SupplierModifiedData (data = {}) {
  100. return this.AjaxService.post({
  101. url:'/user/shop/info/update',
  102. data,
  103. isLoading: true,
  104. isHost:true
  105. })
  106. }
  107. /**
  108. *运营人员绑定微信
  109. */
  110. BindingWechat (data = {}) {
  111. return this.AjaxService.post({
  112. url:'/user/login/auth/bind',
  113. data,
  114. isLoading: true,
  115. isHost:true
  116. })
  117. }
  118. /**
  119. * @机构-地址列表
  120. * @param:userId 用户ID(必传),
  121. * @param:pageNum 页码
  122. * @param:pageSize 每页条数
  123. */
  124. QueryAddressList (data = {}) {
  125. return this.AjaxService.get({ url:'/personalCenter/findAddress', data, isLoading: true })
  126. }
  127. /**
  128. * @机构-添加&&修改地址
  129. * @param:userId 用户ID(必传),
  130. * @param:地址信息,
  131. */
  132. AddNewAddress (data = {}) {
  133. return this.AjaxService.post({ url:'/personalCenter/saveAddress', data, isLoading: true })
  134. }
  135. /**
  136. * @机构-删除地址
  137. * @param:userId 用户ID(必传),
  138. * @param:地址信息,
  139. */
  140. DeleteNewAddress (data = {}) {
  141. return this.AjaxService.get({ url:'/personalCenter/deleteAddress', data, isLoading: true })
  142. }
  143. /**
  144. * @机构-个人中心
  145. * @param:userId 用户ID(必传),
  146. */
  147. PersonalInfo (data = {}) {
  148. return this.AjaxService.get({ url:'/personalCenter/myCentre', data, isLoading: false })
  149. }
  150. /* 运营人员管理-列表 */
  151. QueryOperatorList (data = {}) {
  152. return this.AjaxService.get({ url:'/operation/list', data, isLoading: true })
  153. }
  154. /* 运营人员管理-添加 */
  155. PostAddOperator (data = {}) {
  156. return this.AjaxService.post({ url:'/operation/add', data, isLoading: true })
  157. }
  158. /* 运营人员管理-删除 */
  159. PostDeleteOperator (data = {}) {
  160. return this.AjaxService.post({ url:'/operation/delete', data, isLoading: true })
  161. }
  162. /* 运营人员管理-更新邀请码 */
  163. PostUpdateOperatorCode (data = {}) {
  164. return this.AjaxService.post({ url:'/operation/updateInvitationCode', data, isLoading: true })
  165. }
  166. }