import request from "../utils/request";

/**
 * 获取区服列表
 * @param params 
 * @returns 
 */
export async function getServerListApi(params: { linkLogId: number }) {
    return request({
        url: "/manage/api/game/gift/pack/game/source/server",
        method: 'GET',
        params
    })
}

/**
 * 访问记录
 * @param data 
 * @returns 
 */
export async function pushLingkLogApi(data: { url: string }) {
    return request({
        url: "/manage/api/game/gift/pack/link/log/push",
        method: 'POST',
        data
    })
}

/**
 * 验证角色名
 * @param params 
 * @returns 
 */
export async function checkRoleApi(params: { linkLogId: number, roleName: string, serverId: number }) {
    return request({
        url: "/manage/api/game/gift/pack/role/check",
        method: 'GET',
        params
    })
}

/**
 * 发送验证码
 * @param params 
 * @returns 
 */
export async function sendPhoneCodeApi(params: { phoneNumber: number, linkLogId: number }) {
    return request({
        url: "/manage/api/game/gift/pack/phone/code/send",
        method: 'GET',
        params
    })
}

/**
 * 领取礼包码
 * @param params 
 * @returns 
 */
export async function getPackApi(params: { linkId: number, randomCode: string, userPhone: number }) {
    return request({
        url: "/manage/api/game/gift/pack/code/send",
        method: 'GET',
        params
    })
}