public.service.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. /**
  2. * 这是所有模块公用业务逻辑的服务
  3. */
  4. export default class PublicService {
  5. constructor(AjaxService) {
  6. Object.assign(this, { AjaxService })
  7. this.name = 'PublicService'
  8. }
  9. /**
  10. * 获取图形验证码
  11. * platformType:小程序 2 WWW 0 CRM 1
  12. */
  13. GetImgVerifyCode (data = {platformType:2}) {
  14. return this.AjaxService.get({
  15. url:'/user/captcha',
  16. data,
  17. isLoading: true,
  18. isHost:true
  19. })
  20. }
  21. /**
  22. * 获取图形验证码
  23. * activateCodeType:机构 2 供应商 3 找回密码 1
  24. */
  25. GetMobileCode (data = {}) {
  26. return this.AjaxService.get({
  27. url:'/user/activateCodeByReg',
  28. data,
  29. isLoading: true
  30. })
  31. }
  32. /**
  33. * 获取图形验证码
  34. * activateCodeType:机构 2 供应商 3 找回密码 1
  35. */
  36. GetMobileCode (data = {}) {
  37. return this.AjaxService.get({
  38. url:'/user/activateCodeByReg',
  39. data,
  40. isLoading: true
  41. })
  42. }
  43. /**
  44. * 获取手机短信验证码
  45. * isCheckCaptcha 是否需要图形验证码:1:检查 , 0:不检查
  46. * mobile 手机号
  47. * activateCodeType 短信类型 :1:找回密码, 2:手机号注册机构, 3:供应商注册
  48. * imgCode 图片验证码
  49. * token 图片验证码token
  50. * platformType: 来源:0:www,1:crm/h5,2:小程序
  51. */
  52. GetRegisterMobileCode (data = {}) {
  53. return this.AjaxService.get({
  54. url:'/user/sms/code',
  55. data,
  56. isLoading: true,
  57. isHost:true
  58. })
  59. }
  60. /**
  61. * 获取手机短信验证码
  62. * bindMobile 机构手机号
  63. * isCheckCaptcha 是否需要图形验证码:1:检查 , 0:不检查z
  64. * mobile 运营人员手机号
  65. * userId 机构用户UserId
  66. * imgCode 图片验证码
  67. * token 图片验证码token
  68. * platformType: 来源:0:www,1:crm/h5,2:小程序
  69. */
  70. GetBindMobileCode (data = {}) {
  71. return this.AjaxService.get({
  72. url:'/user/sms/bind',
  73. data,
  74. isLoading: true,
  75. isHost:true
  76. })
  77. }
  78. }