
import { request } from 'umi';
import { gameApi, api } from '../api';

/**
 * 腾讯所有推广账号列表
 * @returns 
 */
export async function getAllOfOwnerUserApi() {
    return request(gameApi + `/adq/adAccount/allOfOwnerUser`, {
        method: 'GET',
    });
}

/**
 * 头条所有广告账号
 * @returns 
 */
export async function getTtAllUserListApi() {
    return request(gameApi + `/oceanengine/adAccount/allOfUser`, {
        method: 'GET',
    });
}


/**
 * 游戏选择列
 * @returns 
 */
export async function getGameChoiceListApi() {
    return request(gameApi + `/manage/choice/game/list`, {
        method: 'GET',
    });
}

/**
 * CP列表
 * @returns 
 */
export async function getCpChoiceListApi() {
    return request(gameApi + `/manage/choice/cp/list`, {
        method: 'GET',
    });
}

/**
 * 投手列表
 * @returns 
 */
export async function getSubUserWithSelfListApi() {
    // return request(gameApi + '/erp/user/subUserWithSelf');
    // return request(gameApi + '/erp/gameUserGroup/memberUser');
    return request(gameApi + '/manage/choice/agent/user/list');
}

/**
 * 获取不同角色列表
 * @param params 
 * @returns 
 */
export async function getRoleUserListApi(params: { authType: 'GS' | 'CUSTOMER' | 'OPERATE' }) {
    return request(gameApi + '/manage/game/auth/role/auth/user', {
        method: 'GET',
        params
    });
}

/**
 * 渠道选择列表
 * @returns 
 */
export async function getChannelChoiceListApi() {
    return request(gameApi + `/manage/choice/agent/list`, {
        method: 'GET',
    });
}


/**
 * 游戏应用类型
 * @returns 
 */
export async function getGameChoiceParentListType1Api() {
    return request(gameApi + `/manage/choice/game/category/list`, {
        method: 'GET',
    });
}

/**
 * 操作系统选择列表
 * @returns 
 */
export async function getUserSystemTypeChoiceListApi() {
    return request(gameApi + `/manage/choice/os/type/list`, {
        method: 'GET',
    });
}


/**
 * 获取支付方式列表
 * @returns 
 */
export async function getPayListApi() {
    return request(gameApi + '/manage/choice/pay/way/list');
}

/**
 * vip等级选择列表选择列表
 * @returns 
 */
export async function getUserVipLevelChoiceListApi() {
    return request(gameApi + `/manage/choice/vip/level/list`);
}

/**
 * 获取礼包列表
 * @returns 
 */
export async function getPackListApi(data: { gameId?: number, giftName?: string }) {
    return request(gameApi + `/manage/game/gift/list`, { method: 'POST', data });
}

/**
 * 获取游戏区服
 * @param data 
 * @returns 
 */
export async function getGameServerListApi(params: { gameId: number }) {
    return request(gameApi + `/manage/gameServer/all/server/list`, { method: 'GET', params });
}

/**
 * 未参与合服的区服
 * @param params 
 * @returns 
 */
export async function getGameUnMergeServerListApi(params: { gameId: number }) {
    return request(gameApi + `/manage/gameServer/unMerge/server/list`, { method: 'GET', params });
}

export async function getGameServerUnListApi(params: { gameId: number }) {
    return request(gameApi + `/manage/gameServer/all/server/list`, { method: 'GET', params });
}

// 所有广告账号列表
export async function getAccountListNewApi(data: { sourceSystem: string }) {
    return request(api + `/gameData/choice/account/list`, { method: 'POST', data });
}

// 所有渠道列表
export async function getAgentListNewApi(data: { sourceSystem: string }) {
    return request(api + `/gameData/choice/agent/list`, { method: 'POST', data });
}

// 所有游戏列表
export async function getGameListNewApi(data: { sourceSystem: string }) {
    return request(api + `/gameData/choice/game/list`, { method: 'POST', data });
}

// 区服
export async function getGameServerNewApi(data: { gameId?: number[], parentGameId?: number[], sourceSystem?: string }) {
    return request(api + `/gameData/choice/gameServer/list`, { method: 'POST', data });
}

// 所有投手列表
export async function getPitcherListNewApi(data: { sourceSystem: string }) {
    return request(api + `/gameData/choice/pitcher/list`, { method: 'POST', data });
}
/**
 * 最大vip
 * @returns 
 */
export async function getVipLevelApi() {
    return request(api + `/gameData/choice/vip/level`);
}