Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
eduline
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
冷斌
eduline
Commits
0418588e
Commit
0418588e
authored
Jun 04, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
f6ae961f
794ebe31
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletions
+8
-1
apps/classroom/Tpl/default/Index/theme_x7_w3g.html
+1
-1
apps/exams/Lib/Model/ExamsPaperModel.class.php
+7
-0
No files found.
apps/classroom/Tpl/default/Index/theme_x7_w3g.html
View file @
0418588e
...
...
@@ -92,7 +92,7 @@
<div
class=
"home_item_mark_orange layout_center"
>
付费
</div>
</if>
<span
class=
"text_14_600 color_333333 weight_full van-multi-ellipsis--l2"
style=
"margin-right: 1.5rem;margin-left: 0.625rem;"
>
{$vo['exams_paper_title']}
</span>
<if
condition=
"$vo['price'] eq 0"
>
<if
condition=
"$vo['price'] eq 0
or $vo['is_buy'] eq 1
"
>
<div
@
click=
"onStart({$vo['exams_paper_id']})"
class=
"home_button_green layout_center"
>
开始做题
</div>
<else
/>
<div
@
click=
"onPay({$vo['exams_paper_id']})"
class=
"home_button_orange layout_center"
>
¥{$vo['price']}
</div>
...
...
apps/exams/Lib/Model/ExamsPaperModel.class.php
View file @
0418588e
...
...
@@ -61,6 +61,7 @@ class ExamsPaperModel extends Model
$data
[
$key
][
'paper_subject_fullpath'
]
=
$subjectModel
->
getFullPathById
(
$v
[
'exams_subject_id'
]);
$data
[
$key
][
'exams_module_title'
]
=
$this
->
getModuleTitleAttr
(
$v
[
'exams_module_id'
]);
$data
[
$key
][
'level_title'
]
=
$this
->
getLevelTitle
(
$v
[
'level'
]);
$data
[
$key
][
'is_buy'
]
=
$this
->
isBuy
(
$v
[
'exams_paper_id'
],
$this
->
mid
);
// 判断自动组卷(1)和手动组卷
if
(
$v
[
'assembly_type'
]
==
1
)
{
$paper_options
=
unserialize
(
$v
[
'paper_options'
]);
...
...
@@ -111,6 +112,12 @@ class ExamsPaperModel extends Model
return
M
(
'exams_module'
)
->
where
(
'exams_module_id='
.
$module_id
)
->
getField
(
'title'
);
}
public
function
isBuy
(
$id
,
$uid
)
{
$order
=
M
(
'exams_paper_order'
)
->
where
(
"uid =
{
$uid
}
and paper_id =
{
$id
}
and pay_status = 3"
)
->
getField
(
'id'
);
return
!
empty
(
$order
)
?
1
:
0
;
}
/**
* 获取试卷难度名称
* @Author MartinSun<syh@sunyonghong.com>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment