123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347 |
- /**
- * 这是用户业务逻辑的服务
- */
- export default class UserService {
- constructor(AjaxService) {
- Object.assign(this, { AjaxService })
- this.name = 'UserService'
- }
- /* 初始化授权登录 */
- UserLoginAuthApplets (data = {}) {
- return this.AjaxService.post({
- url: '/user/login/auth/applets',
- data,
- isLoading: false,
- isHost:true
- })
- }
- /* 邀请码授权登录 */
- InvitationCodeLogin (data = {}) {
- return this.AjaxService.post({
- url: '/user/login/auth/invitation',
- data,
- isLoading: true,
- isStatus: false,
- isHost:true
- })
- }
- /* 普通机构注册 */
- UserRegisterClub (data = {}) {
- return this.AjaxService.post({
- url:'/user/register/club',
- data,
- isLoading: true,
- isHost:true
- })
- }
- /* 供应商注册 */
- SupplierAppletsRegistered (data = {}) {
- return this.AjaxService.post({
- url:'/user/register/shop',
- data,
- isLoading: true,
- isHost:true
- })
- }
- /**
- * 账号登录
- * @param mobileOrEmail 邮箱或手机
- * @param password 密码
- * @param source 来源 PC与小程序传:'www'crm就传'crm'
- */
- AorganizationLogin (data = {}) {
- return this.AjaxService.post({
- url:'/user/login/password',
- data,
- isLoading: true ,
- isStatus: true,
- isHost:true
- })
- }
- /* 查询机构资料*/
- OrganizationUpdateModifyInfo (data = {}) {
- return this.AjaxService.get({
- url:'/user/club/info',
- data,
- isLoading: true,
- isHost:true
- })
- }
- /* 协销拉机构上线(查询暂时数据)*/
- UseRregisterTemporaryInfo (data = {}) {
- return this.AjaxService.get({
- url:'/user/register/temporary/data',
- data,
- isLoading: true,
- isHost:true
- })
- }
- /* 机构升级会员机构 */
- OrganizationRegister (data = {}) {
- return this.AjaxService.post({
- url:'/user/register/club/upgrade',
- data,
- isLoading: true,
- isHost:true
- })
- }
- /* 机构提交资料修改 */
- OrganizationUpdate (data = {}) {
- return this.AjaxService.post({
- url:'/user/club/info/update',
- data,
- isLoading: true,
- isHost:true
- })
- }
- /* 供应商资料信息-数据回显 */
- SupplierShopInfo (data = {}) {
- return this.AjaxService.get({
- url:'/user/shop/info',
- data,
- isLoading: true,
- isHost:true
- })
- }
- /* 供应商修改申请信息保存 */
- SupplierUpdateCompanyInfo (data = {}) {
- return this.AjaxService.post({
- url:'/user/register/shop/apply',
- data,
- isLoading: true,
- isHost:true
- })
- }
- /* 供应商资料信息-提交修改 */
- SupplierModifiedData (data = {}) {
- return this.AjaxService.post({
- url:'/user/shop/info/update',
- data,
- isLoading: true,
- isHost:true
- })
- }
- /**
- *运营人员绑定微信
- */
- BindingWechat (data = {}) {
- return this.AjaxService.post({
- url:'/user/login/auth/bind',
- data,
- isLoading: true,
- isHost:true
- })
- }
- /*普通机构取消提示*/
- CancelPrompt (data = {}) {
- return this.AjaxService.get({
- url:'/user/register/guide',
- data,
- isLoading: false ,
- isHost:true
- })
- }
- /**
- * 找回密码&修改密码
- * @param: mobileOrEmail 手机号或邮箱
- * @param: password 密码
- * @param: passwordConfirm 用户确认密码
- * @param: smsCode 短信验证码
- * @param: status 1:手机号找回,2:邮箱找回
- */
- ModifyMobilePassword (data = {}) {
- return this.AjaxService.post({
- url:'/user/update/password',
- data,
- isLoading: true ,
- isHost:true
- })
- }
- /**
- * 更换手机号
- * @param: mobile 原手机号
- * @param: newMobile 新手机号
- * @param: smsCode 原手机号验证码
- * @param: newSmsCode 新手机号验证码
- * @param: userId 用户userId
- */
- UserUpdateMobile (data = {}) {
- return this.AjaxService.post({
- url:'/user/update/mobile',
- data,
- isLoading: true ,
- isHost:true
- })
- }
- /**
- * @机构-地址列表
- * @param:userId 用户ID(必传),
- * @param:pageNum 页码
- * @param:pageSize 每页条数
- */
- QueryAddressList (data = {}) {
- return this.AjaxService.get({
- url:'/personalCenter/findAddress',
- data,
- isLoading: true ,
- })
- }
- /**
- * @机构-添加&&修改地址
- * @param:userId 用户ID(必传),
- * @param:地址信息,
- */
- AddNewAddress (data = {}) {
- return this.AjaxService.post({
- url:'/personalCenter/saveAddress',
- data,
- isLoading: true ,
- })
- }
- /**
- * @机构-删除地址
- * @param:userId 用户ID(必传),
- * @param:地址信息,
- */
- DeleteNewAddress (data = {}) {
- return this.AjaxService.get({
- url:'/personalCenter/deleteAddress',
- data,
- isLoading: true ,
- })
- }
- /**
- * @机构-个人中心
- * @param:userId 用户ID(必传),
- */
- PersonalInfo (data = {}) {
- return this.AjaxService.get({
- url:'/personalCenter/myCentre',
- data,
- isLoading: false ,
- })
- }
- /**
- * @机构-获取账户余额明细
- * @param:userId 用户ID(必传),
- */
- GetAccountInfo (data = {}) {
- return this.AjaxService.get({
- url:'/personalCenter/touchBalance',
- data,
- isLoading: true ,
- })
- }
- /* 运营人员管理-列表 */
- QueryOperatorList (data = {}) {
- return this.AjaxService.get({
- url:'/user/operation/list',
- data,
- isLoading: true ,
- isHost:true
- })
- }
- /* 运营人员管理-添加 */
- PostAddOperator (data = {}) {
- return this.AjaxService.post({
- url:'/user/operation/save',
- data,
- isLoading: true ,
- isHost:true
- })
- }
- /* 运营人员管理-删除 */
- PostDeleteOperator (data = {}) {
- return this.AjaxService.post({
- url:'/user/operation/delete',
- data,
- isLoading: true ,
- isHost:true
- })
- }
- /* 运营人员管理-更新邀请码 */
- PostUpdateOperatorCode (data = {}) {
- return this.AjaxService.post({
- url:'/user/operation/code/update',
- data,
- isLoading: true ,
- isHost:true
- })
- }
- /* 机构购物车简单列表*/
- GetUserCartNumber (data = {}) {
- return this.AjaxService.get({
- url:'/shoppingCart/header/cart',
- data,
- isLoading: true ,
- })
- }
- /**
- *@协销帮机构注册 待注册列表
- *@param userId 协销用户userId
- *@param searchName 关键词
- *@param pageNum 页码
- *@param pageSize 条数
- */
- SellerUserTemporaryClub (data = {}) {
- return this.AjaxService.get({
- url:'/user/seller/temporary/club',
- data,
- isLoading: true ,
- isHost:true
- })
- }
- /**
- *@协销待注册列表 删除操作
- *@param ID
- */
- SellerDeleteUserTemporaryClub (data = {}) {
- return this.AjaxService.post({
- url:'/user/seller/delete/temporary/club',
- data,
- isLoading: true ,
- isHost:true
- })
- }
- /**
- *@获取采美豆状态
- *@userId userId
- */
- GetHomeObtainBeans (data = {}) {
- return this.AjaxService.get({
- url:'/user/club/obtain/beans',
- data,
- isLoading: false,
- isHost:true
- })
- }
- /**
- *@获取机构个人中心
- *@userId userId
- */
- GetClubObtainCenter (data = {}) {
- return this.AjaxService.get({
- url:'/user/club/home',
- data,
- isLoading: false,
- isHost:true
- })
- }
- /**
- *@机构采美豆收支明细
- *@param userId 机构用户userId
- *@param year 年份
- *@param month 月份
- *@param type 收支类型:全部0 1收入 2支出
- *@param pageNum 页码
- *@param pageSize 条数
- */
- GetUserClubBeansList (data = {}) {
- return this.AjaxService.get({
- url:'/user/club/beans/history',
- data,
- isLoading: false,
- isHost:true
- })
- }
- }
|