import request from '@/utils/request'


/**
 * 获取企微映射表列表
 * @param {*} data 
 * @returns 
 */
export function getQwChanelList(data) {
    return request({
        url: `/platform/bookPlatformQwChanel/list/page`,
        method: 'POST',
        data
    })
}

/**
 * 获取企微映射
 * @param {*} data 
 * @returns 
 */
export function getChanelList(params) {
    return request({
        url: `/platform/bookPlatformQwChanel/list/all`,
        method: 'GET',
        params
    })
}

/**
 * 获取书城
 * @returns 
 */
export function getBookPlatformAll() {
    return request({
        url: `/platform/bookPlatform/all`,
        method: 'GET'
    })
}

/**
 * 新增或者修改
 * @param {*} data 
 * @returns 
 */
export function addOrEditQwChanel(data) {
    return request({
        url: `/platform/bookPlatformQwChanel/add/or/update`,
        method: 'POST',
        data
    })
}

/**
 * 删除
 * @param {*} params 
 * @returns 
 */
export function delQwChanel(params) {
    return request({
        url: `/platform/bookPlatformQwChanel/delete`,
        method: 'DELETE',
        params
    })
}


/**
 * 搜索账号接口
 * @param {*} params 
 * @returns 
 */
export function queryApi(params) {
    let { resourceType, resourceName } = params
    return request({
        url: `/erp/resource/query/10,0,3,20/${resourceName || 'null'}`
    });
  }