import request from '@/utils/request'

// 设备跌倒检测开关
export function fallcheck(data) {
    return request({
        url: '/watch-api/device/set/up/fallcheck',
        method: 'get',
        params: data
    })
}

// 设备自动定位开关
export function autolocate(data) {
    return request({
        url: '/watch-api/device/set/up/autolocate',
        method: 'get',
        params: data
    })
}

// 设备数据上传间隔设置
export function datafreq(data) {
    return request({
        url: '/watch-api/device/set/up/datafreq',
        method: 'get',
        params: data
    })
}

// 翻腕亮屏设置
export function lcdgesture(data) {
    return request({
        url: '/watch-api/device/set/up/lcdgesture',
        method: 'get',
        params: data
    })
}

// 心率报警设置
export function hralarm(data) {
    return request({
        url: '/watch-api/device/set/up/hralarm',
        method: 'post',
        data
    })
}

// 血氧报警设置
export function spo2alarm(data) {
    return request({
        url: '/watch-api/device/set/up/spo2alarm',
        method: 'post',
        data
    })
}

// 血压报警设置
export function bpalarm(data) {
    return request({
        url: '/watch-api/device/set/up/bpalarm',
        method: 'post',
        data
    })
}

// 温度报警设置
export function temperatureAlarm(data) {
    return request({
        url: '/watch-api/device/set/up/temperature/alarm',
        method: 'get',
        params: data
    })
}

// 自动房颤设置
export function autoaf(data) {
    return request({
        url: '/watch-api/device/set/up/autoaf',
        method: 'get',
        params: data
    })
}

// 目标设置
export function goal(data) {
    return request({
        url: '/watch-api/device/set/up/goal',
        method: 'post',
        data
    })
}

// 设置语言
export function languageSet(data) {
    return request({
        url: '/watch-api/device/set/up/language/set',
        method: 'post',
        data
    })
}

// 发送设备消息
export function messageSend(data) {
    return request({
        url: '/watch-api/device/set/up/message',
        method: 'get',
        params: data
    })
}

// 设置跌倒检测灵敏度
export function fallcheckSensitivity(data) {
    return request({
        url: '/watch-api/device/set/up/fallcheck/sensitivity',
        method: 'get',
        params: data
    })
}

// 心率数据测量间隔设置
export function measureIntervalHr(data) {
    return request({
        url: '/watch-api/device/set/up/measure/interval/hr',
        method: 'get',
        params: data
    })
}

// 其他非心率数据测量间隔设置
export function measureIntervalOther(data) {
    return request({
        url: '/watch-api/device/set/up/measure/interval/other',
        method: 'get',
        params: data
    })
}

// 下发通讯录
export function phonebookSync(data) {
    return request({
        url: '/watch-api/device/set/up/phonebook/sync',
        method: 'post',
        data
    })
}

// 清空通讯录
export function clearPhonebook(data) {
    return request({
        url: '/watch-api/device/set/up/phonebook/clear',
        method: 'get',
        params: data
    })
}

// 设置闹钟
export function setClockalarm(data) {
    return request({
        url: '/watch-api/device/set/up/clockalarm/set',
        method: 'post',
        data
    })
}

// 清除闹钟
export function clearClockalarm(data) {
    return request({
        url: '/watch-api/device/set/up/clockalarm/clear',
        method: 'get',
        params: data
    })
}

// 设置久坐
export function setSedentary(data) {
    return request({
        url: '/watch-api/device/set/up/sedentary/set',
        method: 'post',
        data
    })
}

// 清除久坐
export function clearSedentary(data) {
    return request({
        url: '/watch-api/device/set/up/sedentary/clear',
        method: 'get',
        params: data
    })
}

// 设备恢复出厂
export function resetFactory(data) {
    return request({
        url: '/watch-api/device/set/up/factory/reset',
        method: 'get',
        params: data
    })
}

// 下发用户设置到设备
export function setUserInfo(data) {
    return request({
        url: '/watch-api/device/set/up/userinfo',
        method: 'post',
        data
    })
}

// 设备实时定位
export function realtimeLocation(data) {
    return request({
        url: '/watch-api/device/set/up/realtime/location',
        method: 'get',
        params:data
    })
}

// 设备实时定位
export function datasync(data) {
    return request({
        url: '/watch-api/device/set/up/datasync',
        method: 'get',
        params:data
    })
}