互动-快问快答
核心类
类名 | 类描述 |
---|---|
VHExamObject | 快问快答类 |
VHExamObject 关键方法
VHExamObjectDelegate 关于快问快答的代理方法
方法 | 方法描述 |
---|---|
paperSendMessage | 推送快问快答 |
paperEndMessage | 收卷 |
paperSendRankMessage | 公布成绩 |
paperAutoEndMessage | 自动收卷 |
paperAutoEendRankMessage | 自动公布成绩 |
答题前置条件检查
- (void)examUserFormCheckWithWebinar_id:(NSString *)webinar_id user_name:(NSString *)user_name head_img:(NSString *)head_img mobile:(NSString *)mobile complete:(void(^)(VHExamUserFormCheckModel * examUserFormCheckModel ,NSError * error))complete;
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
webinar_id | 是 | 123456789 | 活动 ID |
user_name | 是 | 阿超 | 用户名 |
head_img | 是 | https://xxx.png | 头像 |
mobile | 是 | 132xxxxxxx | 手机号 |
complete | 是 | 返回数据 | 完成回调 |
参数名称 | 备注 |
---|---|
is_answer | 是否已答题 0.否 1.是 |
is_fill | 是否需要填写表单 0.否 1.是 |
[self.examObject examUserFormCheckWithWebinar_id:self.webinar_id user_name:@"" head_img:@"" mobile:@"" complete:^(VHExamUserFormCheckModel *examUserFormCheckModel, NSError *error) {
if (examUserFormCheckModel) {
VH_ShowToast([examUserFormCheckModel.responseObject mj_JSONString]);
}
if (error) {
VH_ShowToast(error.localizedDescription);
}
}];
初始化用户表单
- (void)examGetUserFormInfoWithWebinar_id:(NSString *)webinar_id paper_id:(NSString *)paper_id complete:(void(^)(VHExamGetUserFormInfoModel * examGetUserFormInfoModel ,NSError * error))complete;
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
webinar_id | 是 | 123456789 | 活动 ID |
paper_id | 是 | 123456 | 试卷 ID |
complete | 是 | 返回数据 | 完成回调 |
参数名称 | 备注 |
---|---|
form_data | 表单信息 |
title | 试卷标题 |
user_info | 用户填写信息 |
guidelines | 答题须知 |
extension | 拓展 |
[self.examObject examGetUserFormInfoWithWebinar_id:self.webinar_id paper_id:self.paperIDTF.text complete:^(VHExamGetUserFormInfoModel *examGetUserFormInfoModel, NSError *error) {
if (examGetUserFormInfoModel) {
VH_ShowToast([examGetUserFormInfoModel.responseObject mj_JSONString]);
self.user_detail = examGetUserFormInfoModel.form_data;
}
if (error) {
VH_ShowToast(error.localizedDescription);
}
}];
发送验证码
- (void)examSendVerifyCodeWithWebinar_id:(NSString *)webinar_id paper_id:(NSString *)paper_id phone:(NSString *)phone country_code:(NSString *)country_code complete:(void(^)(VHExamSendVerifyCodeModel * examSendVerifyCodeModel ,NSError * error))complete;
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
webinar_id | 是 | 123456789 | 活动 ID |
paper_id | 是 | 123456 | 试卷 ID |
phone | 是 | 132xxxxxxxx | 手机号码 |
country_code | 否 | CN | 国家码默认 CN |
complete | 是 | 返回数据 | 完成回调 |
参数名称 | 备注 |
---|---|
status | 1 成功/0 失败 |
[self.examObject examSendVerifyCodeWithWebinar_id:self.webinar_id paper_id:self.paperIDTF.text phone:self.phoneTF.text country_code:@"" complete:^(VHExamSendVerifyCodeModel *examSendVerifyCodeModel, NSError *error) {
if (examSendVerifyCodeModel) {
VH_ShowToast([examSendVerifyCodeModel.responseObject mj_JSONString]);
}
if (error) {
VH_ShowToast(error.localizedDescription);
}
}];
保存用户表单信息
- (void)examVerifyCodeWithWebinar_id:(NSString *)webinar_id paper_id:(NSString *)paper_id phone:(NSString *)phone verify_code:(NSString *)verify_code country_code:(NSString *)country_code complete:(void(^)(VHExamVerifyCodeModel * examVerifyCodeModel ,NSError * error))complete;
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
webinar_id | 是 | 123456789 | 活动 ID |
paper_id | 是 | 123456 | 试卷 ID |
phone | 是 | 132xxxxxxxx | 手机号码 |
verify_code | 是 | sad122 | 验证码 |
country_code | 否 | CN | 国家码默认 CN |
complete | 是 | 返回数据 | 完成回调 |
参数名称 | 备注 |
---|---|
status | 1 成功/0 失败 |
[self.examObject examVerifyCodeWithWebinar_id:self.webinar_id paper_id:self.paperIDTF.text phone:self.phoneTF.text verify_code:self.verifyCodeTF.text country_code:@"" complete:^(VHExamVerifyCodeModel * examVerifyCodeModel, NSError *error) {
if (examVerifyCodeModel) {
VH_ShowToast([examVerifyCodeModel.responseObject mj_JSONString]);
}
if (error) {
VH_ShowToast(error.localizedDescription);
}
}];
保存用户表单信息
- (void)examSaveUserFormWithWebinar_id:(NSString *)webinar_id user_detail:(NSString *)user_detail verify_code:(NSString *)verify_code complete:(void(^)(NSDictionary * responseObject ,NSError * error))complete;
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
webinar_id | 是 | 123456789 | 活动 ID |
user_detail | 是 | {"16130":"分享","16131":"A"} | 用户提交 表单 json |
verify_code | 是 | sad122 | 验证码 |
complete | 是 | 返回数据 | 完成回调 |
[self.examObject examSaveUserFormWithWebinar_id:self.webinar_id user_detail:self.user_detail verify_code:self.verifyCodeTF.text complete:^(NSDictionary * responseObject, NSError * error) {
if (responseObject) {
VH_ShowToast([responseObject mj_JSONString]);
}
if (error) {
VH_ShowToast(error.localizedDescription);
}
}];
获取场次已推送试卷列表
- (void)examGetPushedPaperListWithWebinar_id:(NSString *)webinar_id switch_id:(NSString *)switch_id complete:(void(^)(NSArray <VHExamGetPushedPaperListModel *> *examGetPushedPaperList ,NSError * error))complete;
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
webinar_id | 是 | 123456789 | 活动 ID |
switch_id | 是 | 123456 | 场次 id |
complete | 是 | 返回数据 | 完成回调 |
参数名称 | 备注 |
---|---|
paper_id | 试卷 id |
title | 试卷标题 |
push_time | 推送时间 |
limit_time_switch | 限时开关 |
status | 是否作答 0.否 1.是 |
is_end | 答题是否结束 0.否 1.是 |
right_rate | 正确率 |
limit_time | 限时 |
total_score | 试卷总分 |
question_num | 题目数 |
paperUrl | 试卷观看地址 |
[self.examObject examGetPushedPaperListWithWebinar_id:self.webinarInfoData.webinar.data_id switch_id:self.webinarInfoData.data_switch.switch_id complete:^(NSArray<VHExamGetPushedPaperListModel *> *examGetPushedPaperList, NSError *error) {
// 暂时每次清理
[self.dataSource removeAllObjects];
// 添加数据
[self.dataSource addObjectsFromArray:examGetPushedPaperList];
// 刷新数据
[self.tableView reloadData];
}];
获取试卷详情
- (void)examGetPaperInfoForWatchWithWebinar_id:(NSString *)webinar_id paper_id:(NSString *)paper_id complete:(void(^)(VHExamGetPaperInfoForWatchModel * examGetPaperInfoForWatchModel ,NSError * error))complete;
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
webinar_id | 是 | 123456789 | 活动 ID |
paper_id | 是 | 123456 | 试卷 ID |
complete | 是 | 返回数据 | 完成回调 |
参数名称 | 备注 |
---|---|
title | 试卷标题 |
push_time | 推送时间 |
question_detail | 详情 |
limit_time_switch | 限时开关 |
limit_time | 限时 |
[self.examObject examGetPaperInfoForWatchWithWebinar_id:self.webinar_id paper_id:self.paperIDTF.text complete:^(VHExamGetPaperInfoForWatchModel *examGetPaperInfoForWatchModel, NSError *error) {
if (examGetPaperInfoForWatchModel) {
VH_ShowToast([examGetPaperInfoForWatchModel.responseObject mj_JSONString]);
}
if (error) {
VH_ShowToast(error.localizedDescription);
}
}];
单题提交
- (void)examAnswerQuestionWithWebinar_id:(NSString *)webinar_id paper_id:(NSString *)paper_id question_id:(NSString *)question_id user_answer:(NSString *)user_answer complete:(void(^)(NSDictionary *responseObject ,NSError * error))complete;
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
webinar_id | 是 | 123456789 | 活动 ID |
paper_id | 是 | 123456 | 试卷 ID |
question_id | 是 | 123 | 题目 ID |
user_answer | 是 | 答案字符串 | 用户答案 |
complete | 是 | 完成回调 |
[self.examObject examAnswerQuestionWithWebinar_id:self.webinar_id paper_id:self.paperIDTF.text question_id:self.questionIDTF.text user_answer:self.userAnswerTF.text complete:^(NSDictionary * responseObject, NSError * error) {
if (responseObject) {
VH_ShowToast([responseObject mj_JSONString]);
}
if (error) {
VH_ShowToast(error.localizedDescription);
}
}];
主动交卷
- (void)examInitiativeSubmitPaperWithWebinar_id:(NSString *)webinar_id paper_id:(NSString *)paper_id complete:(void(^)(NSDictionary *responseObject ,NSError * error))complete;
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
webinar_id | 是 | 123456789 | 活动 ID |
paper_id | 是 | 123456 | 试卷 ID |
complete | 是 | 返回数据 | 完成回调 |
[self.examObject examInitiativeSubmitPaperWithWebinar_id:self.webinar_id paper_id:self.paperIDTF.text complete:^(NSDictionary *responseObject, NSError *error) {
if (responseObject) {
VH_ShowToast([responseObject mj_JSONString]);
}
if (error) {
VH_ShowToast(error.localizedDescription);
}
}];
获取已答题记录断点续答
- (void)examGetUserAnswerPaperHistoryWithWebinar_id:(NSString *)webinar_id paper_id:(NSString *)paper_id complete:(void(^)(NSArray <VHExamGetUserAnswerPaperHistoryModel *> *examGetUserAnswerPaperHistoryList ,NSError * error))complete;
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
webinar_id | 是 | 123456789 | 活动 ID |
paper_id | 是 | 123456 | 试卷 ID |
complete | 是 | 返回数据 | 完成回调 |
参数名称 | 备注 |
---|---|
question_id | 题目 id |
answer | 答案 |
[self.examObject examGetUserAnswerPaperHistoryWithWebinar_id:self.webinar_id paper_id:self.paperIDTF.text complete:^(NSArray<VHExamGetUserAnswerPaperHistoryModel *> *examGetUserAnswerPaperHistoryList, NSError *error) {
if (examGetUserAnswerPaperHistoryList.count > 0) {
}
if (error) {
VH_ShowToast(error.localizedDescription);
}
}];
获取榜单信息
- (void)examGetSimpleRankListWithWebinar_id:(NSString *)webinar_id paper_id:(NSString *)paper_id pageNum:(NSInteger)pageNum pageSize:(NSInteger)pageSize complete:(void(^)(NSArray <VHExamGetSimpleRankListModel *> *examGetSimpleRankList ,NSError * error))complete;
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
webinar_id | 是 | 1234566789 | 活动 ID |
paper_id | 是 | 123 | 试卷 ID |
pageNum | 是 | 1 | 第几页 |
pageSize | 是 | 10 | 每页数量 |
complete | 是 | 返回数据 | 完成回调 |
参数名称 | 备注 |
---|---|
name | 用户名 |
head_img | 头像 |
score | 得分 |
rank_no | 排名 |
right_rate | 正确率 |
account_id | 参会 id |
status | 是否有效 0.否 1.是 |
is_initiative | 是否主动交卷 0.否 1.是 |
use_time | 用时 秒 |
[self.examObject examGetSimpleRankListWithWebinar_id:self.webinar_id paper_id:self.paperIDTF.text pageNum:1 pageSize:20 complete:^(NSArray<VHExamGetSimpleRankListModel *> *examGetSimpleRankList, NSError *error) {
if (examGetSimpleRankList.count > 0) {
}
if (error) {
VH_ShowToast(error.localizedDescription);
}
}];
获取个人成绩
- (void)examPersonScoreInfoWithWebinar_id:(NSString *)webinar_id paper_id:(NSString *)paper_id complete:(void(^)(VHExamPersonScoreInfoModel *examPersonScoreInfoModel ,NSError * error))complete;
参数名称 | 是否必须 | 示例 | 备注 |
---|---|---|---|
webinar_id | 是 | 123456789 | 活动 ID |
paper_id | 是 | 123456 | 试卷 ID |
complete | 是 | 返回数据 | 完成回调 |
参数名称 | 备注 |
---|---|
account_id | 账户 id |
title | 试卷标题 |
user_info | 用户填写信息 |
head_img | 头像地址 |
user_form | 表单信息 |
question_detail | 用户答题数据 |
is_initiative | 是否主动交卷 0.否 1.是 |
right_rate | 正确率 |
error_num | 错误数 |
rank | 个人排名 ,0 为无成绩 |
unanswer_num | 未作答数 |
use_time | 用时秒 |
score | 得分 |
right_num | 正确数 |
[self.examObject examPersonScoreInfoWithWebinar_id:self.webinar_id paper_id:self.paperIDTF.text complete:^(VHExamPersonScoreInfoModel *examPersonScoreInfoModel, NSError *error) {
if (examPersonScoreInfoModel) {
VH_ShowToast([examPersonScoreInfoModel.responseObject mj_JSONString]);
}
if (error) {
VH_ShowToast(error.localizedDescription);
}
}];
推送快问 快答
- (void)paperSendMessage:(VHMessage *)message examWebUrl:(NSURL *)examWebUrl;
参数名称 | 备注 |
---|---|
message | 消息详情 |
examWebURL | 快问快答的嵌入页地址 |
收卷
- (void)paperEndMessage:(VHMessage *)message examWebUrl:(NSURL *)examWebUrl;
参数名称 | 备注 |
---|---|
message | 消息详情 |
examWebURL | 快问快答的嵌入页地址 |
公布成绩
- (void)paperSendRankMessage:(VHMessage *)message examWebUrl:(NSURL *)examWebUrl;
参数名称 | 备注 |
---|---|
message | 消息详情 |
examWebURL | 快问快答的嵌入页地址 |
自动收卷
- (void)paperAutoEndMessage:(VHMessage *)message examWebUrl:(NSURL *)examWebUrl;
参数名称 | 备注 |
---|---|
message | 消息详情 |
examWebURL | 快问快答的嵌入页地址 |
自动公布成绩
- (void)paperAutoEendRankMessage:(VHMessage *)message examWebUrl:(NSURL *)examWebUrl;
参数名称 | 备注 |
---|---|
message | 消息详情 |
examWebURL | 快问快答的嵌入页地址 |
修改于 2025-05-27 11:59:31