切换导航条
此项目
正在载入...
登录
郭盛
/
enterprise
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
何书鹏
4 years ago
提交
178782f605add071684e9c5cae3ed8ce2882dcf1
2 个父辈
cbc3ee8b
9ff0dedd
1 个管道 的构建
通过
耗费 1 秒
合并分支 'heshupeng' 到 'master'
查看答案解析列表 查看合并请求
!162
变更
3
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
3 个修改的文件
包含
116 行增加
和
0 行删除
application/mobile/controller/Old.php
application/mobile/controller/Simulation.php
public/mobile.html
application/mobile/controller/Old.php
查看文件 @
178782f
...
...
@@ -359,4 +359,62 @@ class Old extends Api
}
$this
->
success
(
'成功'
,
compact
(
'info'
,
'list'
,
'course'
));
}
/**
* @ApiTitle (查看答案解析)
* @ApiSummary (查看答案解析)
* @ApiMethod (POST)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
*
* @ApiParams (name="old_id", type="int", required=true, description="试卷ID")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1606974837",
"data": [{
"id": 34, //题目ID
"title": "添加一个测试题目", //题目
"option": "[{\"key\":\"A\",\"value\":\"1\"},{\"key\":\"B\",\"value\":\"2\"},{\"key\":\"C\",\"value\":\"3\"},{\"key\":\"D\",\"value\":\"5\"}]", //选项
"type": "1", //题目类型:1=单选题,2=多选题,3=判断题,4=简答题
"answer": "C", //正确答案
"analysis_video": { //解析视频
"cover": "http://www.enterprise.top/assets/img/bg-middle.jpg",
"video": "https://vd2.bdstatic.com/mda-keihfqfq553in3js/sc/mda-keihfqfq553in3js.mp4?playlist=%5B%22hd%22%2C%22sc%22%5D&auth_key=1600505506-0-0-61050652001d98b5ffecfbface23d4f2&bcevod_channel=searchbox_feed&pd=1&pt=3"
},
"analysis_text": "Cookie 并不是它的原意“甜饼”的意思, 而是一个保存在客户机中的简单的文本文件, 这个文件与特定的 Web 文档关联在一起, 保存了该客户机访问这个 Web 文档时的信息, 当客户机再次访问这个 Web 文档时这些信息可供该文档使用。由于“Cookie”具有可以保存在客户机上的神奇特性, 因此它可以帮助我们实现记录用户个人信息的功能, 而这一切都不必使用复杂的 CGI 等程序。", //解析文字
"note": null, //笔记
"is_collect": 0, //是否收藏:0=否,1=是
"status": 2, //状态:0=未答,1=答对,2=答错
"my_answer": "A" //我的答案
}]
})
*/
public
function
analysisList
()
{
$old_id
=
$this
->
request
->
param
(
'old_id'
);
empty
(
$old_id
)
&&
$this
->
error
(
'缺少必要参数'
);
$list
=
Question
::
alias
(
'q'
)
->
join
(
'mobile_question_note qn'
,
'q.id = qn.question_id and qn.user_id='
.
$this
->
auth
->
id
,
'left'
)
->
join
(
'mobile_question_collect qc'
,
'q.id = qc.question_id and qc.user_id='
.
$this
->
auth
->
id
,
'left'
)
->
join
(
'mobile_question_answer qa'
,
'q.id = qa.question_id and qa.user_id='
.
$this
->
auth
->
id
,
'left'
)
->
where
(
'q.target_type'
,
3
)
->
where
(
'q.target_id'
,
$old_id
)
->
field
(
'
q.id,
q.title,
q.option,
q.type,
q.answer,
q.analysis_video,
q.analysis_text,
qn.content note,
if(qc.id > 0,1,0) is_collect,
if(qa.id > 0,if(qa.is_wrong="0",1,2),0) status,
qa.content my_answer
'
)
->
order
([
'type'
=>
'asc'
])
->
select
();
$this
->
success
(
'成功'
,
$list
);
}
}
\ No newline at end of file
...
...
application/mobile/controller/Simulation.php
查看文件 @
178782f
...
...
@@ -359,4 +359,62 @@ class Simulation extends Api
}
$this
->
success
(
'成功'
,
compact
(
'info'
,
'list'
,
'course'
));
}
/**
* @ApiTitle (查看答案解析)
* @ApiSummary (查看答案解析)
* @ApiMethod (POST)
*
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
*
* @ApiParams (name="simulation_id", type="int", required=true, description="试卷ID")
*
* @ApiReturn({
"code": 1,
"msg": "成功",
"time": "1606974837",
"data": [{
"id": 34, //题目ID
"title": "添加一个测试题目", //题目
"option": "[{\"key\":\"A\",\"value\":\"1\"},{\"key\":\"B\",\"value\":\"2\"},{\"key\":\"C\",\"value\":\"3\"},{\"key\":\"D\",\"value\":\"5\"}]", //选项
"type": "1", //题目类型:1=单选题,2=多选题,3=判断题,4=简答题
"answer": "C", //正确答案
"analysis_video": { //解析视频
"cover": "http://www.enterprise.top/assets/img/bg-middle.jpg",
"video": "https://vd2.bdstatic.com/mda-keihfqfq553in3js/sc/mda-keihfqfq553in3js.mp4?playlist=%5B%22hd%22%2C%22sc%22%5D&auth_key=1600505506-0-0-61050652001d98b5ffecfbface23d4f2&bcevod_channel=searchbox_feed&pd=1&pt=3"
},
"analysis_text": "Cookie 并不是它的原意“甜饼”的意思, 而是一个保存在客户机中的简单的文本文件, 这个文件与特定的 Web 文档关联在一起, 保存了该客户机访问这个 Web 文档时的信息, 当客户机再次访问这个 Web 文档时这些信息可供该文档使用。由于“Cookie”具有可以保存在客户机上的神奇特性, 因此它可以帮助我们实现记录用户个人信息的功能, 而这一切都不必使用复杂的 CGI 等程序。", //解析文字
"note": null, //笔记
"is_collect": 0, //是否收藏:0=否,1=是
"status": 2, //状态:0=未答,1=答对,2=答错
"my_answer": "A" //我的答案
}]
})
*/
public
function
analysisList
()
{
$simulation_id
=
$this
->
request
->
param
(
'simulation_id'
);
empty
(
$simulation_id
)
&&
$this
->
error
(
'缺少必要参数'
);
$list
=
Question
::
alias
(
'q'
)
->
join
(
'mobile_question_note qn'
,
'q.id = qn.question_id and qn.user_id='
.
$this
->
auth
->
id
,
'left'
)
->
join
(
'mobile_question_collect qc'
,
'q.id = qc.question_id and qc.user_id='
.
$this
->
auth
->
id
,
'left'
)
->
join
(
'mobile_question_answer qa'
,
'q.id = qa.question_id and qa.user_id='
.
$this
->
auth
->
id
,
'left'
)
->
where
(
'q.target_type'
,
2
)
->
where
(
'q.target_id'
,
$simulation_id
)
->
field
(
'
q.id,
q.title,
q.option,
q.type,
q.answer,
q.analysis_video,
q.analysis_text,
qn.content note,
if(qc.id > 0,1,0) is_collect,
if(qa.id > 0,if(qa.is_wrong="0",1,2),0) status,
qa.content my_answer
'
)
->
order
([
'type'
=>
'asc'
])
->
select
();
$this
->
success
(
'成功'
,
$list
);
}
}
\ No newline at end of file
...
...
public/mobile.html
查看文件 @
178782f
此 diff 太大无法显示。
请
注册
或
登录
后发表评论