提交举报工单

业务场景

CP 在游戏中负责实现举报信息收集的功能和 UI。用户填写完信息后,CP 调用本 API 接口将用户填写的信息提交给 SDK 客服系统

详细业务说明请看客服-举报工单

流程图

接口介绍

/**
 * 提交举报工单
 *
 * @param CustomerServiceReportConfig config   提交的举报工单内容
 */
- (void)submitReportInfo:(CustomerServiceReportConfig *)reportInfo

调用示例

// 提交举报工单回调通知
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onSubmitReportSuccess:) name:NOTIFICATION_SUBMITREPORT_SUCCESS object:nil];
    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onSubmitReportFailed:) name:NOTIFICATION_SUBMITREPORT_FAILED object:nil];


// 接口调用
    CustomerServiceReportConfig *customInfo = [[CustomerServiceReportConfig alloc]init];
    RoleInfo *applicantRoleInfo = [[RoleInfo alloc]init];
    applicantRoleInfo.serverId = @"99"; // 服务器id
    applicantRoleInfo.serverName = @"测试服务器名称"; // 服务器名称
    applicantRoleInfo.roleId = @"id001"; // 角色id
    applicantRoleInfo.roleName = @"只好简化"; // 角色名称
    applicantRoleInfo.roleLevel = @"66"; // 角色等级
    applicantRoleInfo.combatValue = @"0"; // 角色战力
    applicantRoleInfo.roleVipLevel = @""; // vip等级
    applicantRoleInfo.roleCreateTime = @""; // 角色创建时间
    applicantRoleInfo.properties = @"";     // 角色资产
    applicantRoleInfo.gameResVersion = @""; // 游戏资源版本
    
    RoleInfo *reportRoleInfo = [[RoleInfo alloc]init];
    reportRoleInfo.serverId = @"99"; // 服务器id
    reportRoleInfo.serverName = @"report服务器名称"; // 服务器名称
    reportRoleInfo.roleId = @"report_id002"; // 角色id 【联盟id】
    reportRoleInfo.roleName = @"report被举报人"; // 角色名称【联盟名称】
    reportRoleInfo.roleLevel = @"66"; // 角色等级
    reportRoleInfo.combatValue = @"0"; // 角色战力
    reportRoleInfo.roleVipLevel = @""; // vip等级
    reportRoleInfo.roleCreateTime = @""; // 角色创建时间
    reportRoleInfo.properties = @"";     // 角色资产
    reportRoleInfo.gameResVersion = @""; // 游戏资源版本
    
    customInfo.applicantRoleInfo = applicantRoleInfo; // 举报人角色信息
    customInfo.reportRoleInfo = reportRoleInfo; // 被举报人角色信息
    customInfo.context = @"ios测试提交举报工单";
    customInfo.imageUrls = self.upImageArray;
    customInfo.reportType = AVATAR; // Avatar = 1 头像,Nickname = 2 昵称,Chat = 3 聊天, Alliance = 4 联盟
    customInfo.reportReason = POLITICAL_CONTENT; // 1 政治内容,2 诈骗广告,3 涉嫌赌博,4 举报外挂,5 色情低俗,6 恶意发言,7 个人隐私盗用,8 骗子,9 其他
    [[SDKManager getInstance] submitReportInfo:customInfo];

// 回调方法
- (void)onSubmitReportSuccess:(NSNotification *)notif
{
    [self textViewLog:[NSString stringWithFormat:@"举报工单提交成功"]];
}

- (void)onSubmitReportFailed:(NSNotification *)notif
{
    [self textViewLog:[NSString stringWithFormat:@"举报工单提交失败"]];
}

参数说明

入参:CustomerServiceOrderConfig

参数名称类型说明备注
contentNSString举报工单文本内容必传
imageUrlsNSArray举报工单提交的图片 url,可以多张可选
reportTypeNSInteger举报工单举报类型必传
reportReasonNSInteger举报工单举报原因必传
applicantRoleInfoRoleInfo举报人的游戏角色信息RoleInfo必传
reportRoleInfoRoleInfo被举报人的游戏角色信息RoleInfo必传

Int ReportType:举报类型枚举值

参数类型说明
AVATARNSInteger1头像
NICKNAMENSInteger2昵称
CHATNSInteger3聊天
ALLIANCENSInteger4联盟

Int ReportReason:举报理由枚举值

参数类型说明
POLITICAL_CONTENTNSInteger1政治内容
SCAM_ADVERTISEMENTNSInteger2诈骗广告
SUSPECTED_GAMBLINGNSInteger3涉嫌赌博
REPORT_CHEATING_SOFTWARENSInteger4举报外挂
PORNOGRAPHIC_VULGAR_CONTENTNSInteger5色情低俗
MALICIOUS_SPEECHNSInteger6恶意发言
PERSONAL_PRIVACY_THEFTNSInteger7个人隐私盗用
SCAMMERNSInteger8骗子
OTHERNSInteger9其他

错误码

FAQ