跳到主要内容

客服接口

1、说明

使用SDK客服系统,可以联系游戏客服反馈问题并得到沟通和解决。

如果打开客服系统时尚未登录,则不需要传入用户相关信息,如果打开客服时已登录,则需要输入用户id等相关信息。

2、导入头文件

#import "DHUnionConfig.h"
#import "DHUnionDelegate.h"
#import "DHUnionSDK.h"

3、打开客服页面

[DHUnionSDK showFAQWithData:@{@"nick":@"昵称1",@"level":@"12",@"role_id":@"111231423",@"area_id":@"1"} tags:@[]];

传入参数:

字段名称类型含义是否必传
nickNSString玩家昵称
levelNSString玩家等级,内容必须是数字
role_idNSString玩家角色ID
area_idNSString大区ID,如果没有就传0

4、查询客服状态

NSDictionary *param = @{
@"roleId":@"123456" //用户角色id,不要传特殊字符,必传参数
};
[DHUnionSDK checkFAQUnRead:param completion:^(NSError *error, int answerCount, int questionCount) {
if(error){
NSLog(@"==错误码:%@",error);
}
else{
NSLog(@"==状态返回,answerCount:%d,questionCount:%d",answerCount,questionCount);
}
}];

返回参数:

字段名称类型含义
answerCountint玩家未读的客服回复消息数
questionCountint玩家未读的客服回复消息对应的工单数