user.service.js 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  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. CancelPrompt (data = {}) {
  128. return this.AjaxService.get({
  129. url:'/user/register/guide',
  130. data,
  131. isLoading: false ,
  132. isHost:true
  133. })
  134. }
  135. /**
  136. * @机构-地址列表
  137. * @param:userId 用户ID(必传),
  138. * @param:pageNum 页码
  139. * @param:pageSize 每页条数
  140. */
  141. QueryAddressList (data = {}) {
  142. return this.AjaxService.get({
  143. url:'/personalCenter/findAddress',
  144. data,
  145. isLoading: true ,
  146. })
  147. }
  148. /**
  149. * @机构-添加&&修改地址
  150. * @param:userId 用户ID(必传),
  151. * @param:地址信息,
  152. */
  153. AddNewAddress (data = {}) {
  154. return this.AjaxService.post({
  155. url:'/personalCenter/saveAddress',
  156. data,
  157. isLoading: true ,
  158. })
  159. }
  160. /**
  161. * @机构-删除地址
  162. * @param:userId 用户ID(必传),
  163. * @param:地址信息,
  164. */
  165. DeleteNewAddress (data = {}) {
  166. return this.AjaxService.get({
  167. url:'/personalCenter/deleteAddress',
  168. data,
  169. isLoading: true ,
  170. })
  171. }
  172. /**
  173. * @机构-个人中心
  174. * @param:userId 用户ID(必传),
  175. */
  176. PersonalInfo (data = {}) {
  177. return this.AjaxService.get({
  178. url:'/personalCenter/myCentre',
  179. data,
  180. isLoading: false ,
  181. })
  182. }
  183. /* 运营人员管理-列表 */
  184. QueryOperatorList (data = {}) {
  185. return this.AjaxService.get({
  186. url:'/operation/list',
  187. data,
  188. isLoading: true ,
  189. })
  190. }
  191. /* 运营人员管理-添加 */
  192. PostAddOperator (data = {}) {
  193. return this.AjaxService.post({
  194. url:'/operation/add',
  195. data,
  196. isLoading: true ,
  197. })
  198. }
  199. /* 运营人员管理-删除 */
  200. PostDeleteOperator (data = {}) {
  201. return this.AjaxService.post({
  202. url:'/operation/delete',
  203. data,
  204. isLoading: true ,
  205. })
  206. }
  207. /* 运营人员管理-更新邀请码 */
  208. PostUpdateOperatorCode (data = {}) {
  209. return this.AjaxService.post({
  210. url:'/operation/updateInvitationCode',
  211. data,
  212. isLoading: true ,
  213. })
  214. }
  215. }