user.service.js 3.9 KB

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