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

 
 export function login(data) {
 	 return request('/companyapp/app/user/login',data,'POST','application/json;charset=UTF-8');
 }
 export function checkLogin(data) {
 	 return request('/companyapp/app/user/checkLogin',data,'POST','application/json;charset=UTF-8');
 }
 
 export function getCompanyUser(data) {
 	 return request('/companyapp/app/user/getCompanyUser',data,'GET');
 }
 
 export function getUserInfoByUserId(data) {
 	 return request('/companyapp/app/user/getUserInfoByUserId',data,'GET');
 }
 export function getAllUsers(data) {
 	 return request('/companyapp/app/user/getAllUsers',data,'GET');
 }
 export function getUserInfo(data) {
 	 return request('/companyapp/app/user/getUserInfo',data,'GET');
 }
 //h5登录
 export function loginByMp(data) {
 	 return request('/companyapp/app/wx/h5/mp/loginByMp',data,'POST','application/json;charset=UTF-8');
 }
 // 成为会员
 export function registerCourses(data) {
 	 return request('/course_uniapp/companyapp/app/fs/user/beMember',data,'POST','application/json;charset=UTF-8');
 }
 export function setUserInfo(data) {
 	 return request('/companyapp/app/user/setUserInfo',data,'POST','application/json;charset=UTF-8');
 }
 //微信小程序登录
 export function loginByMiniApp(data) {
 	 return request('/course_uniapp/app/wx/miniapp/loginByMa',data,'POST','application/json;charset=UTF-8');
 }
 
 //微信小程序查询用户信息
 export function getwxuser(data) {
 	 return request('/app/wx/miniapp/getMaUser',data,'GET','application/json;charset=UTF-8');
 }
 
 //查询销售部门列表
 export function querydepartment(data) {
 	 return request('/companyapp/app/companyUser/deptList',data,'GET','application/json;charset=UTF-8');
 }
 //查询销售岗位列表
 export function querypost(data) {
 	 return request('/companyapp/app/companyUser/postList',data,'GET','application/json;charset=UTF-8');
 }
 //查询销售角色列表
 export function queryrole(data) {
 	 return request('/companyapp/app/companyUser/roleList',data,'GET','application/json;charset=UTF-8');
 }
 //修改销售部门和岗位
 export function modifysaleNews(data) {
 	 return request('/companyapp/app/companyUser/changeUserDeptAndPost',data,'POST','application/json;charset=UTF-8');
 }
 
 //获取头像以及昵称信息
 export function getusername(data) {
 	 return request('/companyapp/app/wx/h5/mp/userInfo',data,'POST','application/json;charset=UTF-8');
 }
 
 //检查是否有头像以及昵称
 export function checkUserInfo(data) {
 	 return request('/course_uniapp/app/user/checkUserInfo',data,'GET','application/json;charset=UTF-8');
 }

 //更改用户头像以及昵称
 export function editUser(data) {
 	 return request('/course_uniapp/app/user/editUser',data,'POST','application/json;charset=UTF-8');
 }