import request from "@/utils/request";
const requests = '/api'// 线上
// const requests = '/video/transcoding/transcoding'//线下
export default {
    // 登录账号
    // async adminLogin(data) {
    //     let requestData = await request({
    //         url: `${requests}/carBook/adminlogin.action`,
    //         method: "POST",
    //         // headers: { "Content-Type": "application/json;charset=utf-8" },
    //         data: data,
    //     });
    //     return requestData;
    // },

    // 账号列表
    // async adminList(params) {
    //     let requestData = await request({
    //         url: `${requests}/carBook/adminlist.action`,
    //         method: "GET",
    //         headers: { "Content-Type": "multipart/form-data" },
    //         params,
    //     });
    //     return requestData;
    // },

    // 新增管理员
    async adminAdd(data) {
        let requestData = await request({
            url: `${requests}/carBook/admininsert.action`,
            method: "POST",
            data,
        });
        return requestData;
    },
    // 修改管理员
    async adminUpdate(data) {
        let requestData = await request({
            url: `${requests}/carBook/adminupdate.action`,
            method: "POST",
            data,
        });
        return requestData;
    },
    // 修改密码
    // async updatePassword(data) {
    //     let requestData = await request({
    //         url: `${requests}/videoAdmin/updatePassword`,
    //         method: "PUT",
    //         data,
    //     });
    //     return requestData;
    // },
    // 删除管理员
    async adminDel(data) {
        let requestData = await request({
            url: `${requests}/carBook/admindel.action`,
            method: "POST",
            data,
        });
        return requestData;
    },

    // 导出管理员信息
    async download(params) {
        let requestData = await request({
            url: `${requests}/carBook/admintoExcel.action`,
            method: "GET",
            headers: { "Content-Type": "application/x-www-form-urlencoded;charset=utf-8" },
            responseType: "blob",
            params,
        });
        return requestData;
    },

    // 导入监控信息
    // async importByExcel(data) {
    //     let requestData = await request({
    //         // url: "/api/video/videoAdmin/importByExcel",
    //         url: `${requests}/camera/importByExcel`,
    //         method: "POST",
    //         headers: { "Content-Type": "multipart/form-data" },
    //         data: data,
    //     });
    //     return requestData;
    // },
};
