import {request} from '@/utils/request.js'
export function login(data) {
	return request({
		url: '/login',
		method: 'post',
		header:{
			'content-type':"application/x-www-form-urlencoded"
		},
		data
	})
}
export function getUserInfo() {
	return request({
		url: '/user/profile'
	})
}

export function logout() {
	return request({
		url: '/logout',
		method: 'GET'
	})
}
export function register(data) {
	return request({
		url: '/user/register',
		method: 'post',
		data: data
	})
}
/**公用上传接口 */
export function uploadFile(data) {
	return request({
		url: '/upload/file',
		method: "post",
		headers: {
			'Content-Type': 'multipart/form-data'
		},
		data
	})
}
export function updatePwd(data) {
	return request({
		url: '/user/updatePwd',
		method: "post",
		data
	})
}
//查询用户的带岗位
export function getUserList() {
  return request({
    url: '/user/select',
    method: 'get'
  })
}
//企业微信登录
export function wxWorkLogin({userId,code}) {
  return request({
    url: `/user/updateWxUserId/${userId}/${code}`,
    method: 'post'
  })
}
