shop-live/api/user.js

107 lines
2.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
import request from "@/utils/requesta.js";
export function getAdminApplyListAPI(merId) {
return request.get(`admin/${merId}/lis_apply`);
}
/**
* 获取用户信息
*
*/
export function getUserInfo() {
return request.get('user');
}
/**
* 头像
*
*/
export function editAvatar(data) {
return request.post('user/change/info', data);
}
// 修改昵称
export function updateInfo(data) {
return request.post('user/change/avatar', data);
}
/**
* h5用户登录
* @param data object 用户账号密码
*/
export function loginH5(data) {
return request.post("auth/login", data, {
noAuth: true
});
}
/**
* h5用户手机号登录
* @param data object 用户手机号 也只能
*/
export function loginMobile(data) {
return request.post("auth/smslogin", data, {
noAuth: true
});
}
/**
* h5用户手机号登录
* @param data object 用户手机号 也只能
*/
export function loginMpPhone(data) {
return request.post("auth/mp_phone", data, {
noAuth: true
});
}
/**
* 验证码key
*/
export function getCodeApi() {
return request.get("verify_code", {}, {
noAuth: true
});
}
/**
* h5用户发送验证码
* @param data object 用户手机号
*/
export function registerVerify(data) {
return request.post("auth/verify", data, {
noAuth: true
});
}
/**
* h5用户手机号注册
* @param data object 用户手机号 验证码 密码
*/
export function register(data) {
return request.post("auth/register", data, {
noAuth: true
});
}
/**
* 用户手机号修改密码
* @param data object 用户手机号 验证码 密码
*/
export function registerReset(data) {
return request.post("/register/reset", data, {
noAuth: true
});
}
/**
* 用户手机号忘记密码
*/
export function registerForget(data) {
return request.post("user/change_pwd", data, {
noAuth: true
});
}