import request from '@/utils/request';
import { AxiosPromise } from 'axios';
/**
 * 查询应用信息列表
 * @param query
 * @returns {*}
 */

export const companyMembers = (query?: any): AxiosPromise<any[]> => {
    return request({
        url: '/company/members',
        method: 'post',
        data: query
    });
};
export const removeUser = (query?: any): AxiosPromise<any> => {
    return request({
        url: '/bindInfo/removeUser',
        method: 'post',
        data: query
    });
};
export const companyDetail = (id?: any): AxiosPromise<any> => {
    return request({
        url: `/company/detail/${id}`,
        method: 'get'
    });
};
// 设为管理员
export const settingCpyAdmin = (query?: any): AxiosPromise<any> => {
    return request({
        url: '/bindInfo/settingCpyAdmin',
        method: 'get',
        params: query
    });
};
// 后台-绑定申请审批
export const bindInfoApproval = (query?: any): AxiosPromise<any> => {
    return request({
        url: '/bindInfo/approval',
        method: 'post',
        data: query
    });
};
// 后台-绑定申请审批
export const companyCertificatelist = (query?: any): AxiosPromise<any> => {
    return request({
        url: '/companyCertificate/queryList',
        method: 'get',
        params: query
    });
};
// 管理员取消认证
export const cancelCert = (id?: any): AxiosPromise<any> => {
    return request({
        url: `/companyCertificate/cancelCert/${id}`,
        method: 'get'
    });
};
// 后台-企业认证审批
export const approvalCert = (query?: any): AxiosPromise<any> => {
    return request({
        url: '/approval/approvalCert',
        method: 'post',
        data: query
    });
};
// 后台-企业批量授权应用
export const batchGrant = (query?: any): AxiosPromise<any> => {
    return request({
        url: '/perm/applicationcpy/batchGrant',
        method: 'post',
        data: query
    });
};
// 后台-企业批量授权应用
export const batchRemove = (query?: any, cpyId?: any): AxiosPromise<any> => {
    return request({
        url: `/perm/applicationcpy/batchRemove/${cpyId}`,
        method: 'post',
        data: query
    });
};
