import request from '@/utils/request.js'


// 登录方法
export function login(params) {
	return request({
	  	url: '/system/login',
		method: 'POST', 
		params
	})
} 


// 获取用户详细信息
export function getInfo(params) {
	return request({
		url: '/system/getInfo',
		method: 'GET', 
		params
	})
}

// 退出方法
export function logout(params) {
	return request({
		url: '/system/logout',
		method: 'POST', 
		params
	})
}

// 获取验证码
export function getCodeImg(params) {
	return request({
		url: '/system/captchaImage',
		method: 'GET', 
		params
	})
}


// 获取配置信息
export function configList(params) {
	return request({
        url: '/system/system/title/config/list',
		method: 'POST', 
		params
	})
}


// 钉钉第三方 code 换token
export function getThirdH5Auth(params) {
	return request({
        url: '/system/ding/getThirdH5Auth',
		method: 'POST', 
		params
	})
}

// 钉钉内部应用 code 换token
export function h5GetToken(params) {
	return request({
      url: '/system/ding/h5GetToken',
      method: 'get', 
      params
	})
}
// 判断用户当日是否首次登录
export function checkUserFirstLogin(params) {
	return request({
      url: '/system/monitor/logininfor/checkUserFirstLogin',
      method: 'get', 
      params
	})
}