import request from '@/utils/request';

/*
 * 授权手机
 */
export const authPhone = (code) => request(`/api/ma/auth-phone`, { params: { code }, method: 'put' });

/*
 * 授权头像
 */
export const authUser = (data) => request(`/api/ma/auth-user`, { data, method: 'put' });

/*
 * 小程序登录
 */
export const login = (code) => request(`/api/ma/login?code=${code}`, { method: 'post', silent: true });

/*
 * 小程序登录
 */
export const signin = (data) => request(`/api/ma/signin`, { method: 'post', data });

/*
 * 获取当前人员
 */
export const currentUser = () => request(`/api/ma/current`);


/*
 * 修改密码
 */
export const changePwd = (data) => request(`/api/ma/change-password`, { method: 'post', data });
