user.service.js 4.1 KB

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