123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111 |
- /**
- * 这是所有模块公用业务逻辑的服务
- */
- export default class PublicService {
- constructor(AjaxService) {
- Object.assign(this, { AjaxService })
- this.name = 'PublicService'
- }
- /**
- * 获取地址
- */
- GetAllAddressData(data = {}) {
- return this.AjaxService.get({
- url: '/order/address/select/all',
- data,
- isLoading: false,
- })
- }
- /**
- * 获取图形验证码
- * platformType:小程序 2 WWW 0 CRM 1
- */
- GetImgVerifyCode(data = { platformType: 2 }) {
- return this.AjaxService.get({
- url: '/user/captcha',
- data,
- isLoading: true,
- })
- }
- /**
- * 获取图形验证码
- * activateCodeType:机构 2 供应商 3 找回密码 1
- */
- GetMobileCode(data = {}) {
- return this.AjaxService.get({
- url: '/user/activateCodeByReg',
- data,
- isLoading: true
- })
- }
- /**
- * 获取图形验证码
- * activateCodeType:机构 2 供应商 3 找回密码 1
- */
- GetMobileCode(data = {}) {
- return this.AjaxService.get({
- url: '/user/activateCodeByReg',
- data,
- isLoading: true
- })
- }
- /**
- * 获取手机短信验证码
- * isCheckCaptcha 是否需要图形验证码:1:不检查 , 0:检查
- * mobile 手机号
- * activateCodeType 短信类型 :1:找回密码, 2:手机号注册机构, 3:供应商注册 6:二手发布
- * imgCode 图片验证码
- * token 图片验证码token
- * platformType: 来源:0:www,1:crm/h5,2:小程序
- */
- GetRegisterMobileCode(data = {}) {
- return this.AjaxService.get({
- url: '/user/sms/code',
- data,
- isLoading: true,
- })
- }
- /**
- * 获取邮箱短信验证码
- * email 邮箱
- * status 1:绑定邮箱,2邮箱注册,3邮箱找回秘密
- */
- GetUserEmailCode(data = {}) {
- return this.AjaxService.get({
- url: '/user/mail/code',
- data,
- isLoading: true,
- })
- }
- /**
- * 获取手机短信验证码
- * bindMobile 机构手机号
- * isCheckCaptcha 是否需要图形验证码:1:检查 , 0:不检查z
- * mobile 运营人员手机号
- * userId 机构用户UserId
- * imgCode 图片验证码
- * token 图片验证码token
- * platformType: 来源:0:www,1:crm/h5,2:小程序
- */
- GetBindMobileCode(data = {}) {
- return this.AjaxService.get({
- url: '/user/sms/bind',
- data,
- isLoading: true,
- })
- }
- /**
- * 协议
- */
- getProtocol(data) {
- return this.AjaxService.get({
- url: '/user/center/protocol',
- data,
- isLoading: true ,
- })
- }
- }
|