import axios from "@/utils/request";
// let baseUrlZC = 'https://api.xayunmei.com/zhongcaiapi';
// let baseUrl = 'https://api.xayunmei.com/tiaojieapitest';
// let baseUrl = 'http://121.40.189.20:6001';
// 开始云端录制
export function startVideo(data) {
    let appType = sessionStorage.getItem('type');
    if (appType == 'tiaojie') {
        return axios.post(`tiaojie/video/openCloudRecording`, data);
    } else {
        return axios.post(`zhongcai/video/openCloudRecording`, data);
    }
}
// 结束云端录制
export function stopVideo(data) {
    let appType = sessionStorage.getItem('type');
    if (appType == 'tiaojie') {
        return axios.post(`tiaojie/video/closeDeleteCloudRecording?taskId=${data}`);
    } else {
        return axios.post(`zhongcai/video/closeDeleteCloudRecording?taskId=${data}`);
    }
}
// 解散房间
export function destructionRoom(data) {
    let appType = sessionStorage.getItem('type');
    if (appType == 'tiaojie') {
        return axios.post(`tiaojie/video/dissolveRoom`, data);
    } else {
        return axios.post(`zhongcai/video/dissolveRoom`, data);
    }
}
// 根据html字符串转pdf并且和案件关联
export function htmlToPDF(data) {
    let appType = sessionStorage.getItem('type');
    if (appType == 'tiaojie') {
        return axios.post(`tiaojie/video/htmlToPDF`, data);
    } else {
        return axios.post(`zhongcai/video/htmlToPDF`, data);
    }
}
// 根据userId查询该用户是否是秘书
export function secretaryRoleByUserId(userId, caseId) {
    let appType = sessionStorage.getItem('type');
    if (appType == 'tiaojie') {
        return axios.get(`tiaojie/video/secretaryRoleByUserId?userId=${userId}&caseId=${caseId}`);
    } else {
        return axios.get(`zhongcai/video/secretaryRoleByUserId?userId=${userId}`);
    }
}
// 获取证据列表
export function selectById(caseId) {
    return axios.get(`tiaojie/caseApplication/selectById?id=${caseId}`);
}
// 根据案件id查询登录人是否为申请人被申请人
export function selectRoleMenuByCaseId(caseId) {
    return axios.get(`tiaojie/video/selectRoleMenuByCaseId?caseId=${caseId}`);
}
// 保存onlyOffice文档
export function saveOnlyOfficeFile(data) {
    return axios.post(`tiaojie/caseApplication/saveOnlyOfficeFile`, data);
}
//获取当前用户的操作权限
export function getMenuPermsByUser(caseId) {
    return axios.get(`tiaojie/system/menu/getMenuPermsByUser`);
}
// 上传文件
export function videoUpload(data) {
    return axios.post(`tiaojie/video/upload`,data);
}