import { apiResquest } from '../request/request.js'
import { apiResquestForm } from '../request/request.js'
import { apiResquestJsonList } from '../request/request.js'
import { apiResquestFormVideo } from '../request/request.js'
import { apiResquestTimer } from '../request/request.js'


//登录
export const login = (data) => {
	return apiResquest({
		url: `/auth/appletLogin`,
		method: 'POST',
		data: { ...data }
	})
};
//退出登录
export const logout  = (data) => {
    return apiResquest({
        url: `/auth/logout`,
        method: 'GET',
        data: data,
    })
};
//查询公共配置
export const configInfo = (data) => {
	return apiResquest({
		url: `/auth/configInfo`,
		method: 'GET',
		data: data,
	})
};
//获取公共配置的图片
export const getLogoInfo  = (data) => {
    return apiResquest({
        url: `/system/config/info/getConfigByType`,
        method: 'GET',
        data: data,
    })
};
//消息列表
export const systemNoticeGetNoticeList = (data) => {
	return apiResquest({
		url: `/system/notice/getNoticeList`,
		method: 'GET',
		data: data,
	})
};
//化学品登录-扫码验证
export const chemicalAioIdentityScanLogin = (data) => {
	return apiResquest({
		url: `/chemical/aio/identity/scanLogin`,
		method: 'GET',
		data: data,
	})
};

//实验室-列表
export const laboratoryAppletSubList = (data) => {
	return apiResquest({
		url: `/laboratory/applet/subList`,
		method: 'POST',
		data: { ...data }
	})
};
//实验室-详情
export const laboratoryAppletGetSubDetailInfo = (data) => {
	return apiResquest({
		url: `/laboratory/applet/getSubDetailInfo`,
		method: 'GET',
		data: data,
	})
};
//实验室-查询传感器状态
export const iotAppSensorFindBySubId = (data) => {
	return apiResquest({
		url: `/iot/app/sensor/findBySubId`,
		method: 'GET',
		data: data,
	})
};
//实验室-查询硬件设备
export const iotAppHardwareFindByType = (data) => {
	return apiResquest({
		url: `/iot/app/hardware/findByType`,
		method: 'POST',
		data: { ...data }
	})
};


//实验室-硬件设备-开关
export const iotAppHardwareOperatingHardware = (data) => {
	return apiResquest({
		url: `/iot/app/hardware/operatingHardware`,
		method: 'GET',
		data: data,
	})
};

//实验室-查询物联设备
export const iotAppDeviceFindByType = (data) => {
	return apiResquest({
		url: `/iot/app/device/findByType`,
		method: 'POST',
		data: { ...data }
	})
};
//实验室-查询喇叭列表
export const iotAppSpeakerFindHorn = (data) => {
	return apiResquest({
		url: `/iot/app/speaker/findHorn`,
		method: 'GET',
		data: data,
	})
};
//实验室-喇叭播放
export const iotAppSpeakerPlayVoice = (data) => {
	return apiResquest({
		url: `/iot/app/speaker/playVoice`,
		method: 'GET',
		data: data,
	})
};


//扫码-查询化学品详情
export const chemicalAppletCabinetDetail = (data) => {
	return apiResquest({
		url: `/chemical/applet/cabinetDetail`,
		method: 'GET',
		data: data,
	})
};
//查询化学品目录清单
export const chemicalAppletGetCabinetByChemical = (data) => {
	return apiResquest({
		url: `/chemical/applet/getCabinetByChemical`,
		method: 'GET',
		data: data,
	})
};
//扫码-查询化学品信息
export const chemicalAppletGetStockDetail = (data) => {
	return apiResquest({
		url: `/chemical/applet/getStockDetail`,
		method: 'GET',
		data: data,
	})
};
//个人中心-获取个人信息
export const systemUserProfile = (data) => {
	return apiResquest({
		url: `/system/user/profile`,
		method: 'GET',
		data: data,
	})
};
//用户修改头像接口
export const systemMineUserEdit = (data) => {
	return apiResquest({
		url: `/system/mine/user/edit`,
		method: 'POST',
		data: { ...data }
	})
};
/*                分类获取公共配置
* category        1.系统参数 2.公共配置
* configType      1.基础配置 2.管控一体机 3.化学品终端 4.小程序配置 5.开发配置 6.首页配置
*/
export function getConfigByType(data) {
	return apiResquest({
		url: '/system/config/info/getConfigByType',
		method: 'post',
		data: {
			...data
		}
	})
}

//查询人员身份标识
export const getGentleIdentifier = (data) => {
	return apiResquest({
		url: `/security/checkSet/getGentle`,
		method: 'GET',
		data: data,
	})
};

//查询小程序布局配置
export const systemAppletLayoutSelect = (data) => {
	return apiResquest({
    url: '/system/applet/layout/select',
		method: 'GET',
		data: data,
	})
};
//查询权限字段
export const systemAppletRolePermission = (data) => {
	return apiResquest({
    url: '/system/applet/role/permission',
		method: 'GET',
		data: data,
	})
};



/************************扫码相关************************/

//化学品终端-扫码登录
export const chemicalAioVerifyScanLogin  = (data) => {
	return apiResquest({
		url: `/chemical/aio/verify/scanLogin`,
		method: 'GET',
		data: data,
	})
};
//化学品终端-双人认证
export const chemicalAioVerifyAppletLogin  = (data) => {
	return apiResquest({
		url: `/chemical/aio/verify/appletLogin`,
		method: 'GET',
		data: data,
	})
};


/************************未调试************************/



//获取离开检查配置
export const outSubjectPhoto  = (id,data) => {
    return apiResquestForm({
        url: `/base/app/lab/api/outSubjectPhoto`,
        method: 'GET',
        data: data,
    })
};

//分级管控未完成工作列表
export const gradingControl  = (data) => {
    return apiResquest({
        url: `/base/app/lab/manage/havingList`,
        method: 'POST',
        data: {...data}
    })
};

