/*
 * @Author: zc
 * @description 登录
 */
import request from '@/utils/request';
/**
 * @description 用户登录
 * @param {object} data  登录参数
 * @returns 返回接口数据
 */
// @ts-ignore
export const signIn = (data?: object) => {
	return request({
		url: '/api/v1/Identity/login',
		method: 'post',
		data,
	});
};
/**
 * @description 密码修改状态 未修改直接跳转到修改密码页面  不进入系统
 *  @returns
 */
export const pwdCheck = () => {
	return request({
		url: '/api/v1/User/pwd-changed',
		method: 'get',
	});
};
/**
 * @description 检测是否有随手拍工单 如果有需要提示
 *  @returns
 */
export const checkSnapshotOrder = () => {
	return request({
		url: '/api/v1/Snapshot/wait_accept_count',
		method: 'get',
	});
};
/**
 * @description 登录系统配置
 *  @returns
 */
export const loginPageInfo = () => {
	return request({
		url: '/api/v1/Identity/login-page-info',
		method: 'get',
	});
};
/**
 * @description 登录发送验证码
 * @param {string} UserName  登录参数
 *  @returns
 */
export const sendCode = (UserName: string) => {
	return request({
		url: `/api/v1/PushMessage/send_login_message_code?UserName=${UserName}`,
		method: 'get'
	});
}
/**
 * @description 验证账号是否白名单
 * @param {string} params  登录参数
 *  @returns
 */
export const whiteList = (params:object) => {
	return request({
		url: '/api/v1/PushMessage/get_verify_whitelist',
		method: 'get',
		params
	});
}