import Request from '../common/request.js';
let request = new Request().http

//密码登录
export function login(data) {
 	 return request('/app/user/login',data,'POST','application/json;charset=UTF-8');
} 
// 修改密码
export function changePWD(data) {
 	 return request('/app/user/changePWD',data,'POST','application/json;charset=UTF-8');
} 


// 校验短信验证码
export function smsLogin(data) {
 	 return request('/app/user/smsLogin',data,'POST','application/json;charset=UTF-8');
} 
 
 // 忘记密码
export function forgetPassword(data) {
 	 return request('/app/user/forgetPassword',data,'POST','application/json;charset=UTF-8');
} 
//发送短信验证码
export function sendSmsCode(data) {
 	 return request(`/app/user/sendSmsCode?phone=${data.phone}&type=${data.type}`,data,'POST','application/json;charset=UTF-8');
} 
 
 //查询用户信息
export function getUserInfo(data) {
	 return request('/app/user/getUserInfo',data,'GET','application/json;charset=UTF-8');
} 
 //更新业务员个人信息
export function updateUserInfo(data) {
	 return request('/app/user/updateUserInfo',data,'POST','application/json;charset=UTF-8');
} 

//获取当前公司部门列表
export function getDeptList(data) {
	 return request('/app/user/getDeptList',data,'GET','application/json;charset=UTF-8');
} 
//获取当前公司岗位列表
export function getPostList(data) {
	 return request('/app/user/getPostList',data,'GET','application/json;charset=UTF-8');
} 
//获取当前公司所有产品列表
export function getProductList(data) {
	 return request('/app/user/getProductList',data,'GET','application/json;charset=UTF-8');
} 
//获取当前公司所有业务员列表（前端需要排除当前用户）
export function getCompanyUserList(data) {
	 return request('/app/user/getCompanyUserList',data,'GET','application/json;charset=UTF-8');
} 

 
