切换导航条
此项目
正在载入...
登录
郭盛
/
enterprise
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
邮件补丁
差异文件
浏览文件
作者
何书鹏
4 years ago
提交
0977093fdaec103dc4e6988805c6d92249f9eddc
1 个父辈
7e87c8e6
1 个管道 的构建
通过
耗费 6 秒
收藏的题目
变更
2
构建
2
隐藏空白字符变更
内嵌
并排对比
正在显示
2 个修改的文件
包含
10 行增加
和
5 行删除
application/mobile/controller/User.php
public/mobile.html
application/mobile/controller/User.php
查看文件 @
0977093
...
...
@@ -1408,9 +1408,11 @@ class User extends Api
"user_id": 16, //用户ID
"question_id": 1, //题目ID
"createtime": "2020.09.03 19:25", //收藏时间
"is_answer": 1, //是否已作答:0=否,1=是
"question": { //题目信息
"title": "测定混凝土立方体抗压强度时,标准试件的尺寸是( )㎜。", //题目
"type": "1" //题目类型:1=单选题,2=多选题,3=判断题,4=简答题
"type": "1", //题目类型:1=单选题,2=多选题,3=判断题,4=简答题
"target_type":"1" //题目归属类型:1=全能题库,2=模拟试题,3=历年真题,4=每日一练,5=通关密卷
}
}]
}
...
...
@@ -1423,14 +1425,15 @@ class User extends Api
$data
=
QuestionCollect
::
with
([
'question'
])
->
alias
(
'a'
)
->
join
(
'mobile_question b'
,
'a.question_id = b.id'
)
->
join
(
'mobile_question_answer c'
,
'c.question_id = b.id and c.user_id = '
.
$this
->
auth
->
id
,
'left'
)
->
where
(
'a.user_id'
,
$this
->
auth
->
id
)
->
order
(
'a.createtime desc'
)
->
field
(
'a.*'
)
->
field
(
'a.*
,if(c.id > 0,1,0) is_answer
'
)
->
paginate
(
$page_num
,
false
,[
'page'
=>
$page
])
->
each
(
function
(
$v
){
$v
[
'createtime'
]
=
date
(
'Y.m.d H:i'
,
$v
[
'createtime'
]);
if
(
$v
->
getRelation
(
'question'
)){
$v
->
getRelation
(
'question'
)
->
visible
([
'title'
,
'type'
]);
$v
->
getRelation
(
'question'
)
->
visible
([
'title'
,
'type'
,
'target_type'
]);
}
})
->
toArray
();
$this
->
success
(
'成功'
,
[
'total'
=>
$data
[
'total'
],
'list'
=>
$data
[
'data'
]]);
...
...
public/mobile.html
查看文件 @
0977093
...
...
@@ -16097,9 +16097,11 @@
"user_id": 16, //用户ID
"question_id": 1, //题目ID
"createtime": "2020.09.03 19:25", //收藏时间
"is_answer": 1, //是否已作答:0=否,1=是
"question": { //题目信息
"title": "测定混凝土立方体抗压强度时,标准试件的尺寸是( )㎜。", //题目
"type": "1" //题目类型:1=单选题,2=多选题,3=判断题,4=简答题
"type": "1", //题目类型:1=单选题,2=多选题,3=判断题,4=简答题
"target_type":"1" //题目归属类型:1=全能题库,2=模拟试题,3=历年真题,4=每日一练,5=通关密卷
}
}]
}
...
...
@@ -23080,7 +23082,7 @@
<div
class=
"row mt0 footer"
>
<div
class=
"col-md-6"
align=
"left"
>
Generated on 2021-01-25
09:52:58
</div>
Generated on 2021-01-25
16:51:12
</div>
<div
class=
"col-md-6"
align=
"right"
>
<a
href=
"./"
target=
"_blank"
>
企智帮
</a>
</div>
...
...
请
注册
或
登录
后发表评论