import { getAxios, postAxios, downFile } from '@/utils/axios.js'
import { ElMessage } from 'element-plus';
//租户获取登录id
export function rentgetloginID(data) {
    return getAxios({ url: `/api/tenant/get-id-by-name?name=${data.name}`})
}
//登录
export function login(data) {
    return postAxios({ url: '/api/user/bigbrother-doLogin', data })
}
//获取国家
export function getCountryinfo(data) {
    return postAxios({ url: '/api/common/country_info', data })
}

//查询tk账号查询次数
export function tkaccountuseinfo(accountName) {
    return getAxios({ url: `/api/common/accountCount?accountName=${accountName}` })
}

export function tokenVerification() {
    return getAxios({ url: `/api/common/health` })
}

export function tkhostdata(data) {
    return postAxios({ url: '/api/big-brother/page', data })
}



export function apiGetCart() {
    return getAxios({ url: '/cgi-bin/cart/latest' })
}
// export function login(data) {
//     return postAxios({ url: 'api/account/login', data })
// }
export function cheekalive(data) {
    return postAxios({ url: 'api/account/cheekalive', data })
}

export function dicts(data) {
    return postAxios({ url: 'api/param/dicts', data })
}
export function tkhostdetail(data) {
    return postAxios({ url: 'api/tkinfo/tkhostdetail', data })
}
//导出表格
export function exporthosts(data) {
    return postAxios({ url: 'api/export/hostsinfo', data })
}
export function downList(url, data) {
    return downFile(url, data)
}

//查询员工
export function getStaffList(data) {
    return postAxios({ url: 'api/account/list', data })
}
//分配主播
export function managerhosts(data) {
    return postAxios({ url: 'api/account/managerhosts', data })
}
//编辑主播
export function upholdinfo(data) {
    return postAxios({ url: 'api/tkinfo/upholdinfo', data })
}

//查看名字
export function accountName(str) {
    return postAxios({ url: 'api/account/accountName?accounts=' + str })
}

