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
1698479b
Commit
1698479b
authored
Jun 24, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
0a602308
a99b891d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
111 additions
and
76 deletions
+111
-76
apps/classroom/Tpl/default/Index/find_w3g.html
+1
-1
apps/exams/Tpl/default/Index/examsresult_w3g.html
+110
-75
No files found.
apps/classroom/Tpl/default/Index/find_w3g.html
View file @
1698479b
...
@@ -95,7 +95,7 @@
...
@@ -95,7 +95,7 @@
},
},
methods
:
{
methods
:
{
onChange
:
function
(
tab
)
{
onChange
:
function
(
tab
)
{
console
.
log
(
tab
)
//
console.log(tab)
switch
(
tab
){
switch
(
tab
){
case
0
:
case
0
:
window
.
location
.
href
=
"{:U('classroom/Index/index')}"
window
.
location
.
href
=
"{:U('classroom/Index/index')}"
...
...
apps/exams/Tpl/default/Index/examsresult_w3g.html
View file @
1698479b
<!DOCTYPE html>
<!DOCTYPE html>
<include
file=
"__THEME__/public_header_w3g"
/>
<include
file=
"__THEME__/public_header_w3g"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{$Think.APPS_URL}/exams/_static/css/public.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{$Think.APPS_URL}/exams/_static/css/public.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{$Think.APPS_URL}/exams/_static/icon/iconfont.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{$Think.APPS_URL}/exams/_static/icon/iconfont.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{$Think.APPS_URL}/exams/_static/css/public_header_footer_media.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{$Think.APPS_URL}/exams/_static/css/public_header_footer_media.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{$Think.APPS_URL}/exams/_static/css/exam_2.0.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"{$Think.APPS_URL}/exams/_static/css/exam_2.0.css"
>
<style
type=
"text/css"
>
<style
type=
"text/css"
>
.static-exam
dl
.operation
.analysis
{
display
:
block
;}
.static-exam
dl
.operation
.analysis
{
display
:
block
;
}
</style>
</style>
<div
class=
"min-height-wrap"
>
<div
class=
"min-height-wrap"
>
<div
class=
"cstlayer exams_top"
>
<div
class=
"cstlayer exams_top"
>
...
@@ -14,13 +16,17 @@
...
@@ -14,13 +16,17 @@
<h3>
{$paper.exams_paper_title}
</h3>
<h3>
{$paper.exams_paper_title}
</h3>
</div>
</div>
<div
class=
"cstlayer-content"
>
{$answerData.score|default='0'}
</div>
<div
class=
"cstlayer-content"
>
{$answerData.score|default='0'}
</div>
<p
class=
"cstlayer-txt"
></p>
<!--本卷平均分{$avg.avg|default='0'}分,超过{$avg.transcend_rate}的人-->
<p
class=
"cstlayer-txt"
></p>
<!--本卷平均分{$avg.avg|default='0'}分,超过{$avg.transcend_rate}的人-->
<php>
if($answerData['exams_mode'] != 3
&&
$answerData['exams_mode'] != 4){
</php>
<php>
if($answerData['exams_mode'] != 3
&&
$answerData['exams_mode'] != 4){
</php>
<a
href=
"{:U('exams/index/examsroom',['paper_id'=>$paper['exams_paper_id'],'joinType'=>$answerData['exams_mode']])}"
class=
"add-eaxm"
>
再次挑战
</a>
<a
href=
"{:U('exams/index/examsroom',['paper_id'=>$paper['exams_paper_id'],'joinType'=>$answerData['exams_mode']])}"
class=
"add-eaxm"
>
再次挑战
</a>
<php>
}else if($answerData['exams_mode'] == 4){
</php>
<php>
}else if($answerData['exams_mode'] == 4){
</php>
<a
href=
"{:U('exams/Index/wrongExamsroom',['joinType'=>1,'paper_id'=>$paper['exams_paper_id'],'temp'=>$answerData['exams_users_id'],'is_highwrong'=>1])}"
class=
"add-eaxm"
>
再次挑战
</a>
<a
href=
"{:U('exams/Index/wrongExamsroom',['joinType'=>1,'paper_id'=>$paper['exams_paper_id'],'temp'=>$answerData['exams_users_id'],'is_highwrong'=>1])}"
class=
"add-eaxm"
>
再次挑战
</a>
<php>
}else{
</php>
<php>
}else{
</php>
<a
href=
"{:U('exams/Index/wrongExamsroom',['joinType'=>1,'paper_id'=>$paper['exams_paper_id'],'temp'=>$answerData['pid']])}"
class=
"add-eaxm"
>
再次挑战
</a>
<a
href=
"{:U('exams/Index/wrongExamsroom',['joinType'=>1,'paper_id'=>$paper['exams_paper_id'],'temp'=>$answerData['pid']])}"
class=
"add-eaxm"
>
再次挑战
</a>
<php>
}
</php>
<php>
}
</php>
<dl
class=
"business-card"
>
<dl
class=
"business-card"
>
<dt>
排名
<h1>
{$rank.now.rank|default='1'}
</h1></dt>
<dt>
排名
<h1>
{$rank.now.rank|default='1'}
</h1></dt>
...
@@ -44,10 +50,14 @@
...
@@ -44,10 +50,14 @@
</tr>
</tr>
<volist
name=
"rank.list"
id=
"item"
>
<volist
name=
"rank.list"
id=
"item"
>
<tr>
<tr>
<td><h6>
{$i}
</h6></td>
<td>
<h6>
{$i}
</h6>
</td>
<td><a
href=
"{:U('home/UserShow/index',['uid'=>$item['uid']])}"
><img
src=
"{:getUserFace($item['uid'])}"
></a><small>
{:getUsername($item['uid'])}
</small></td>
<td><a
href=
"{:U('home/UserShow/index',['uid'=>$item['uid']])}"
><img
src=
"{:getUserFace($item['uid'])}"
></a><small>
{:getUsername($item['uid'])}
</small></td>
<td><em>
{:floor($item['anser_time']/60)}'{:$item['anser_time'] % 60}
</em></td>
<td><em>
{:floor($item['anser_time']/60)}'{:$item['anser_time'] % 60}
</em></td>
<td><h6>
{$item.score|default="0"}
</h6></td>
<td>
<h6>
{$item.score|default="0"}
</h6>
</td>
</tr>
</tr>
</volist>
</volist>
</table>
</table>
...
@@ -78,7 +88,9 @@
...
@@ -78,7 +88,9 @@
}
}
</php>
</php>
<dl>
<dl>
<dt><h6>
{$options_type.type_info.question_type_title}
</h6></dt>
<dt>
<h6>
{$options_type.type_info.question_type_title}
</h6>
</dt>
<dd>
<dd>
<volist
name=
"paper_options['options_questions_data'][$options_type['question_type']]"
id=
"question"
>
<volist
name=
"paper_options['options_questions_data'][$options_type['question_type']]"
id=
"question"
>
<php>
if($_GET['joinType'] == 3
&&
!in_array($question['exams_question_id'],$inQuestions)) continue;
</php>
<php>
if($_GET['joinType'] == 3
&&
!in_array($question['exams_question_id'],$inQuestions)) continue;
</php>
...
@@ -98,9 +110,11 @@
...
@@ -98,9 +110,11 @@
<!-- 单选题 -->
<!-- 单选题 -->
<volist
name=
"paper_options['options_questions_data'][$options_type['question_type']]"
id=
"question"
>
<volist
name=
"paper_options['options_questions_data'][$options_type['question_type']]"
id=
"question"
>
<php>
if($_GET['joinType'] == 3
&&
!in_array($question['exams_question_id'],$inQuestions)) continue;
</php>
<php>
if($_GET['joinType'] == 3
&&
!in_array($question['exams_question_id'],$inQuestions)) continue;
</php>
<dl
<
php
>
if(in_array($question['exams_question_id'],$wrongList)){
</php>
class="wrong"
<php>
}
</php>
id="ex{$question_num}" data-type="{$options_type.question_type_key}" data-question_num="{$question_num}">
<dl
<
php
>
if(in_array($question['exams_question_id'],$wrongList)){
</php>
class="wrong"
<php>
}
</php>
id="ex{$question_num}" data-type="{$options_type.question_type_key}" data-question_num="{$question_num}">
<dt>
<dt>
<h5><small>
{$question_num}
</small>
/{$answerData['right_count']+$answerData['wrong_count']}
<!-- {$paper_options.questions_count} -->
<strong>
{$options_type.type_info.question_type_title}
</strong></h5>
<h5><small>
{$question_num}
</small>
/{$answerData['right_count']+$answerData['wrong_count']}
<!-- {$paper_options.questions_count} -->
<strong>
{$options_type.type_info.question_type_title}
</strong></h5>
<h3>
{$question.content}
</h3>
<h3>
{$question.content}
</h3>
</dt>
</dt>
<dd>
<dd>
...
@@ -114,17 +128,23 @@
...
@@ -114,17 +128,23 @@
<div
class=
"operation"
>
<div
class=
"operation"
>
<!--答案解析-->
<!--答案解析-->
<php>
<php>
$content = isset($answerData['content'][$question['exams_question_id']]) ? $answerData['content'][$question['exams_question_id']] : [];
$content = isset($answerData['content'][$question['exams_question_id']]) ?
$answerData['content'][$question['exams_question_id']] : [];
</php>
</php>
<div
class=
"analysis"
>
<div
class=
"analysis"
>
<table
class=
"analysis-pic"
>
<table
class=
"analysis-pic"
>
<td>
<td>
<h6>
正确答案
</h6>
<h6>
正确答案
</h6>
<abbr><volist
name=
"question.answer_true_option"
id=
"answer_true"
>
{$answer_true}
</volist></abbr>
<abbr>
<volist
name=
"question.answer_true_option"
id=
"answer_true"
>
{$answer_true}
</volist>
</abbr>
</td>
</td>
<td>
<td>
<h6>
我的答案
</h6>
<h6>
我的答案
</h6>
<em><php>
if(!$content){
</php>
未作答
<php>
}
</php><volist
name=
"content"
id=
"ans"
>
{$ans|default='未作答'}
</volist></em>
<em>
<php>
if(!$content){
</php>
未作答
<php>
}
</php>
<volist
name=
"content"
id=
"ans"
>
{$ans|default='未作答'}
</volist>
</em>
</td>
</td>
</table>
</table>
<div
class=
"analysis-txt"
>
<div
class=
"analysis-txt"
>
...
@@ -135,9 +155,11 @@
...
@@ -135,9 +155,11 @@
</div>
</div>
<div
class=
"collect_hidden"
>
<div
class=
"collect_hidden"
>
<php>
if($question['is_collect'] == 1){
</php>
<php>
if($question['is_collect'] == 1){
</php>
<i
data-question_num=
"{$question_num}"
data-question_id=
"{$question.exams_question_id}"
data-action=
"0"
class=
"icon icon-shoucang2"
style=
"color:#F7B659;"
></i>
<i
data-question_num=
"{$question_num}"
data-question_id=
"{$question.exams_question_id}"
data-action=
"0"
class=
"icon icon-shoucang2"
style=
"color:#F7B659;"
></i>
<php>
}else{
</php>
<php>
}else{
</php>
<i
data-question_num=
"{$question_num}"
data-question_id=
"{$question.exams_question_id}"
data-action=
"1"
class=
"icon icon-shoucang2"
></i>
<i
data-question_num=
"{$question_num}"
data-question_id=
"{$question.exams_question_id}"
data-action=
"1"
class=
"icon icon-shoucang2"
></i>
<php>
}
</php>
<php>
}
</php>
</div>
</div>
</dl>
</dl>
...
@@ -148,14 +170,17 @@
...
@@ -148,14 +170,17 @@
<!-- 填空题 -->
<!-- 填空题 -->
<volist
name=
"paper_options['options_questions_data'][$options_type['question_type']]"
id=
"question"
>
<volist
name=
"paper_options['options_questions_data'][$options_type['question_type']]"
id=
"question"
>
<php>
if($_GET['joinType'] == 3
&&
!in_array($question['exams_question_id'],$inQuestions)) continue;
</php>
<php>
if($_GET['joinType'] == 3
&&
!in_array($question['exams_question_id'],$inQuestions)) continue;
</php>
<dl
<
php
>
if(in_array($question['exams_question_id'],$wrongList)){
</php>
class="wrong"
<php>
}
</php>
id="ex{$question_num}" data-type="{$options_type.question_type_key}" data-question_num="{$question_num}">
<dl
<
php
>
if(in_array($question['exams_question_id'],$wrongList)){
</php>
class="wrong"
<php>
}
</php>
id="ex{$question_num}" data-type="{$options_type.question_type_key}" data-question_num="{$question_num}">
<dt>
<dt>
<h5><small>
{$question_num}
</small>
/{$answerData['right_count']+$answerData['wrong_count']}
<!-- {$paper_options.questions_count} -->
<strong>
{$options_type.type_info.question_type_title}
</strong></h5>
<h5><small>
{$question_num}
</small>
/{$answerData['right_count']+$answerData['wrong_count']}
<!-- {$paper_options.questions_count} -->
<strong>
{$options_type.type_info.question_type_title}
</strong></h5>
<h3>
{$question.content}
</h3>
<h3>
{$question.content}
</h3>
</dt>
</dt>
<dd>
<dd>
<php>
<php>
$content = isset($answerData['content'][$question['exams_question_id']]) ? $answerData['content'][$question['exams_question_id']] : [];
$content = isset($answerData['content'][$question['exams_question_id']]) ?
$answerData['content'][$question['exams_question_id']] : [];
</php>
</php>
<volist
name=
"question.answer_true_option"
id=
"answer"
>
<volist
name=
"question.answer_true_option"
id=
"answer"
>
<label>
{$i}、
<input
type=
"text"
class=
"anserItem"
<
php
>
if($content){
</php>
value="{$content[$i-1]}"
<php>
}
</php>
>
</label>
<label>
{$i}、
<input
type=
"text"
class=
"anserItem"
<
php
>
if($content){
</php>
value="{$content[$i-1]}"
<php>
}
</php>
>
</label>
...
@@ -182,9 +207,11 @@
...
@@ -182,9 +207,11 @@
</div>
</div>
<div
class=
"collect_hidden"
>
<div
class=
"collect_hidden"
>
<php>
if($question['is_collect'] == 1){
</php>
<php>
if($question['is_collect'] == 1){
</php>
<i
data-question_num=
"{$question_num}"
data-question_id=
"{$question.exams_question_id}"
data-action=
"0"
class=
"icon icon-shoucang2"
style=
"color:#F7B659;"
></i>
<i
data-question_num=
"{$question_num}"
data-question_id=
"{$question.exams_question_id}"
data-action=
"0"
class=
"icon icon-shoucang2"
style=
"color:#F7B659;"
></i>
<php>
}else{
</php>
<php>
}else{
</php>
<i
data-question_num=
"{$question_num}"
data-question_id=
"{$question.exams_question_id}"
data-action=
"1"
class=
"icon icon-shoucang2"
></i>
<i
data-question_num=
"{$question_num}"
data-question_id=
"{$question.exams_question_id}"
data-action=
"1"
class=
"icon icon-shoucang2"
></i>
<php>
}
</php>
<php>
}
</php>
</div>
</div>
</dl>
</dl>
...
@@ -195,14 +222,17 @@
...
@@ -195,14 +222,17 @@
<!-- 简述题-->
<!-- 简述题-->
<volist
name=
"paper_options['options_questions_data'][$options_type['question_type']]"
id=
"question"
>
<volist
name=
"paper_options['options_questions_data'][$options_type['question_type']]"
id=
"question"
>
<php>
if($_GET['joinType'] == 3
&&
!in_array($question['exams_question_id'],$inQuestions)) continue;
</php>
<php>
if($_GET['joinType'] == 3
&&
!in_array($question['exams_question_id'],$inQuestions)) continue;
</php>
<dl
<
php
>
if(in_array($question['exams_question_id'],$wrongList)){
</php>
class="wrong"
<php>
}
</php>
id="ex{$question_num}" data-type="{$options_type.question_type_key}" data-question_num="{$question_num}">
<dl
<
php
>
if(in_array($question['exams_question_id'],$wrongList)){
</php>
class="wrong"
<php>
}
</php>
id="ex{$question_num}" data-type="{$options_type.question_type_key}" data-question_num="{$question_num}">
<dt>
<dt>
<h5><small>
{$question_num}
</small>
/{$answerData['right_count']+$answerData['wrong_count']}
<!-- {$paper_options.questions_count} -->
<strong>
{$options_type.type_info.question_type_title}
</strong></h5>
<h5><small>
{$question_num}
</small>
/{$answerData['right_count']+$answerData['wrong_count']}
<!-- {$paper_options.questions_count} -->
<strong>
{$options_type.type_info.question_type_title}
</strong></h5>
<h3>
{$question.content}
</h3>
<h3>
{$question.content}
</h3>
</dt>
</dt>
<dd>
<dd>
<php>
<php>
$content = isset($answerData['content'][$question['exams_question_id']]) ? $answerData['content'][$question['exams_question_id']] : [];
$content = isset($answerData['content'][$question['exams_question_id']]) ?
$answerData['content'][$question['exams_question_id']] : [];
</php>
</php>
<textarea
class=
"anserItem"
>
{$content[0]|default=''}
</textarea>
<textarea
class=
"anserItem"
>
{$content[0]|default=''}
</textarea>
</dd>
</dd>
...
@@ -218,9 +248,11 @@
...
@@ -218,9 +248,11 @@
</div>
</div>
<div
class=
"collect_hidden"
>
<div
class=
"collect_hidden"
>
<php>
if($question['is_collect'] == 1){
</php>
<php>
if($question['is_collect'] == 1){
</php>
<i
data-question_num=
"{$question_num}"
data-question_id=
"{$question.exams_question_id}"
data-action=
"0"
class=
"icon icon-shoucang2"
style=
"color:#F7B659;"
></i>
<i
data-question_num=
"{$question_num}"
data-question_id=
"{$question.exams_question_id}"
data-action=
"0"
class=
"icon icon-shoucang2"
style=
"color:#F7B659;"
></i>
<php>
}else{
</php>
<php>
}else{
</php>
<i
data-question_num=
"{$question_num}"
data-question_id=
"{$question.exams_question_id}"
data-action=
"1"
class=
"icon icon-shoucang2"
></i>
<i
data-question_num=
"{$question_num}"
data-question_id=
"{$question.exams_question_id}"
data-action=
"1"
class=
"icon icon-shoucang2"
></i>
<php>
}
</php>
<php>
}
</php>
</div>
</div>
</dl>
</dl>
...
@@ -247,30 +279,30 @@
...
@@ -247,30 +279,30 @@
</html>
</html>
<script
src=
"{$Think.APPS_URL}/exams/_static/js/public_header_footer_media.js"
></script>
<script
src=
"{$Think.APPS_URL}/exams/_static/js/public_header_footer_media.js"
></script>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
$
(
function
()
{
$
(
function
()
{
// 显示的解析类型
// 显示的解析类型
window
.
type
=
1
;
window
.
type
=
1
;
// 下一题
// 下一题
$
(
".next_question,.go_question"
).
click
(
function
()
{
$
(
".next_question,.go_question"
).
click
(
function
()
{
if
(
$
(
this
).
hasClass
(
"go_question"
))
{
if
(
$
(
this
).
hasClass
(
"go_question"
))
{
var
question_num
=
parseInt
(
$
(
this
).
data
(
"question_num"
));
var
question_num
=
parseInt
(
$
(
this
).
data
(
"question_num"
));
}
else
if
(
window
.
type
==
2
)
{
}
else
if
(
window
.
type
==
2
)
{
// 获取下一个错题
// 获取下一个错题
var
next_obj
=
$
(
this
).
parents
(
"dl"
).
nextAll
(
".wrong"
).
first
();
var
next_obj
=
$
(
this
).
parents
(
"dl"
).
nextAll
(
".wrong"
).
first
();
var
question_num
=
next_obj
.
length
>
0
?
next_obj
.
data
(
"question_num"
)
:
0
;
var
question_num
=
next_obj
.
length
>
0
?
next_obj
.
data
(
"question_num"
)
:
0
;
}
else
{
}
else
{
var
question_num
=
parseInt
(
$
(
this
).
data
(
"question_num"
))
+
1
;
var
question_num
=
parseInt
(
$
(
this
).
data
(
"question_num"
))
+
1
;
}
}
$
(
".answer-card"
).
hide
();
$
(
".answer-card"
).
hide
();
if
(
$
(
"#ex"
+
question_num
).
length
>
0
)
{
if
(
$
(
"#ex"
+
question_num
).
length
>
0
)
{
$
(
"#ex"
+
question_num
).
show
().
siblings
().
hide
();
$
(
"#ex"
+
question_num
).
show
().
siblings
().
hide
();
}
else
{
}
else
{
ui
.
confirm
(
'已经是最后一题了,是否返回第一题?'
,
{
ui
.
confirm
(
'已经是最后一题了,是否返回第一题?'
,
{
yes
:
function
()
{
yes
:
function
()
{
if
(
window
.
type
==
2
)
{
if
(
window
.
type
==
2
)
{
$
(
".static-exam .wrong"
).
first
().
show
().
siblings
().
hide
();
$
(
".static-exam .wrong"
).
first
().
show
().
siblings
().
hide
();
}
else
{
}
else
{
$
(
"#ex1"
).
show
().
siblings
().
hide
();
$
(
"#ex1"
).
show
().
siblings
().
hide
();
}
}
question_num
=
1
;
question_num
=
1
;
...
@@ -278,27 +310,27 @@
...
@@ -278,27 +310,27 @@
});
});
}
}
// 添加搜藏标识
// 添加搜藏标识
var
html
=
$
(
"#ex"
+
question_num
).
find
(
".collect_hidden"
).
html
();
var
html
=
$
(
"#ex"
+
question_num
).
find
(
".collect_hidden"
).
html
();
$
(
".exam-header .view-stop>i"
).
remove
();
$
(
".exam-header .view-stop>i"
).
remove
();
$
(
".exam-header .view-stop a"
).
before
(
html
);
$
(
".exam-header .view-stop a"
).
before
(
html
);
if
(
question_num
<=
1
)
{
if
(
question_num
<=
1
)
{
$
(
".back-date i"
).
hide
();
$
(
".back-date i"
).
hide
();
}
else
{
}
else
{
$
(
".back-date i"
).
show
();
$
(
".back-date i"
).
show
();
}
}
$
(
".static-exam,.footer"
).
show
();
$
(
".static-exam,.footer"
).
show
();
});
});
/** 查看解析 **/
/** 查看解析 **/
$
(
".show_analysis"
).
click
(
function
()
{
$
(
".show_analysis"
).
click
(
function
()
{
var
type
=
$
(
this
).
data
(
"type"
);
var
type
=
$
(
this
).
data
(
"type"
);
$
(
".static-exam dl"
).
hide
();
$
(
".static-exam dl"
).
hide
();
if
(
type
==
'wrong'
)
{
if
(
type
==
'wrong'
)
{
$
(
".static-exam .wrong"
).
first
().
show
();
$
(
".static-exam .wrong"
).
first
().
show
();
window
.
type
=
2
;
window
.
type
=
2
;
// 添加搜藏标识
// 添加搜藏标识
var
html
=
$
(
".static-exam .wrong"
).
first
().
find
(
".collect_hidden"
).
html
();
var
html
=
$
(
".static-exam .wrong"
).
first
().
find
(
".collect_hidden"
).
html
();
}
else
{
}
else
{
$
(
".static-exam dl"
).
first
().
show
();
$
(
".static-exam dl"
).
first
().
show
();
window
.
type
=
1
;
window
.
type
=
1
;
// 添加搜藏标识
// 添加搜藏标识
...
@@ -313,29 +345,29 @@
...
@@ -313,29 +345,29 @@
});
});
// 显示答题面板
// 显示答题面板
$
(
"#show-answer-card"
).
click
(
function
()
{
$
(
"#show-answer-card"
).
click
(
function
()
{
if
(
$
(
".answer-card"
).
is
(
":hidden"
))
{
if
(
$
(
".answer-card"
).
is
(
":hidden"
))
{
$
(
".static-exam,.footer"
).
hide
();
$
(
".static-exam,.footer"
).
hide
();
$
(
".answer-card"
).
show
();
$
(
".answer-card"
).
show
();
}
else
{
}
else
{
$
(
".static-exam,.footer"
).
show
();
$
(
".static-exam,.footer"
).
show
();
$
(
".answer-card"
).
hide
();
$
(
".answer-card"
).
hide
();
}
}
});
});
/** 返回前一题 **/
/** 返回前一题 **/
$
(
".back-date i"
).
click
(
function
()
{
$
(
".back-date i"
).
click
(
function
()
{
if
(
window
.
type
==
2
)
{
if
(
window
.
type
==
2
)
{
// 获取下一个错题
// 获取下一个错题
var
prev_obj
=
$
(
".static-exam dl:visible"
).
prev
(
".wrong"
);
var
prev_obj
=
$
(
".static-exam dl:visible"
).
prev
(
".wrong"
);
var
question_num
=
prev_obj
.
length
>
0
?
prev_obj
.
data
(
"question_num"
)
:
0
;
var
question_num
=
prev_obj
.
length
>
0
?
prev_obj
.
data
(
"question_num"
)
:
0
;
}
else
{
}
else
{
var
question_num
=
$
(
".static-exam dl:visible"
).
data
(
"question_num"
)
-
1
;
var
question_num
=
$
(
".static-exam dl:visible"
).
data
(
"question_num"
)
-
1
;
}
}
if
(
question_num
<=
1
)
{
if
(
question_num
<=
1
)
{
if
(
window
.
type
==
2
)
{
if
(
window
.
type
==
2
)
{
$
(
".static-exam .wrong"
).
first
().
show
().
siblings
().
hide
();
$
(
".static-exam .wrong"
).
first
().
show
().
siblings
().
hide
();
}
else
{
}
else
{
$
(
"#ex1"
).
show
().
siblings
().
hide
();
$
(
"#ex1"
).
show
().
siblings
().
hide
();
}
}
...
@@ -344,12 +376,12 @@
...
@@ -344,12 +376,12 @@
var
html
=
$
(
".static-exam dl"
).
first
().
find
(
".collect_hidden"
).
html
();
var
html
=
$
(
".static-exam dl"
).
first
().
find
(
".collect_hidden"
).
html
();
$
(
".exam-header .view-stop>i"
).
remove
();
$
(
".exam-header .view-stop>i"
).
remove
();
$
(
".exam-header .view-stop a"
).
before
(
html
);
$
(
".exam-header .view-stop a"
).
before
(
html
);
}
else
{
}
else
{
if
(
$
(
"#ex"
+
question_num
).
length
>
0
)
{
if
(
$
(
"#ex"
+
question_num
).
length
>
0
)
{
$
(
"#ex"
+
question_num
).
show
().
siblings
().
hide
();
$
(
"#ex"
+
question_num
).
show
().
siblings
().
hide
();
$
(
".back-date i"
).
show
();
$
(
".back-date i"
).
show
();
// 添加搜藏标识
// 添加搜藏标识
var
html
=
$
(
"#ex"
+
question_num
).
find
(
".collect_hidden"
).
html
();
var
html
=
$
(
"#ex"
+
question_num
).
find
(
".collect_hidden"
).
html
();
$
(
".exam-header .view-stop>i"
).
remove
();
$
(
".exam-header .view-stop>i"
).
remove
();
$
(
".exam-header .view-stop a"
).
before
(
html
);
$
(
".exam-header .view-stop a"
).
before
(
html
);
}
}
...
@@ -357,40 +389,43 @@
...
@@ -357,40 +389,43 @@
});
});
// 搜藏
// 搜藏
$
(
".exam-header .view-stop>i"
).
die
(
"click"
).
live
(
"click"
,
function
()
{
$
(
".exam-header .view-stop>i"
).
die
(
"click"
).
live
(
"click"
,
function
()
{
var
_this
=
$
(
this
);
var
_this
=
$
(
this
);
var
action
=
_this
.
data
(
'action'
);
var
action
=
_this
.
data
(
'action'
);
var
question_id
=
_this
.
data
(
'question_id'
);
var
question_id
=
_this
.
data
(
'question_id'
);
// 后台
// 后台
$
.
post
(
U
(
'exams/Index/collect'
),{
action
:
action
,
source_id
:
question_id
},
function
(
res
){
$
.
post
(
U
(
'exams/Index/collect'
),
{
if
(
typeof
(
res
)
!=
'object'
){
action
:
action
,
try
{
source_id
:
question_id
},
function
(
res
)
{
if
(
typeof
(
res
)
!=
'object'
)
{
try
{
var
res
=
JSON
.
parse
(
res
);
var
res
=
JSON
.
parse
(
res
);
}
catch
(
e
)
{
}
catch
(
e
)
{
ui
.
error
(
"处理异常,请重新尝试"
);
ui
.
error
(
"处理异常,请重新尝试"
);
return
false
;
return
false
;
}
}
}
}
if
(
res
.
status
==
1
)
{
if
(
res
.
status
==
1
)
{
if
(
action
==
1
)
{
if
(
action
==
1
)
{
_this
.
css
(
"color"
,
"#F7B659"
);
_this
.
css
(
"color"
,
"#F7B659"
);
_this
.
data
(
'action'
,
0
);
_this
.
data
(
'action'
,
0
);
var
question_num
=
_this
.
data
(
"question_num"
);
var
question_num
=
_this
.
data
(
"question_num"
);
var
collect_hidden
=
$
(
"#ex"
+
question_num
).
find
(
".collect_hidden i"
);
var
collect_hidden
=
$
(
"#ex"
+
question_num
).
find
(
".collect_hidden i"
);
collect_hidden
.
css
(
"color"
,
"#F7B659"
);
collect_hidden
.
css
(
"color"
,
"#F7B659"
);
collect_hidden
.
attr
(
'data-action'
,
0
);
collect_hidden
.
attr
(
'data-action'
,
0
);
}
else
{
}
else
{
// 取消收藏
// 取消收藏
_this
.
css
(
"color"
,
"#888"
);
_this
.
css
(
"color"
,
"#888"
);
_this
.
data
(
'action'
,
1
);
_this
.
data
(
'action'
,
1
);
var
question_num
=
_this
.
data
(
"question_num"
);
var
question_num
=
_this
.
data
(
"question_num"
);
var
collect_hidden
=
$
(
"#ex"
+
question_num
).
find
(
".collect_hidden i"
);
var
collect_hidden
=
$
(
"#ex"
+
question_num
).
find
(
".collect_hidden i"
);
collect_hidden
.
css
(
"color"
,
"#888"
);
collect_hidden
.
css
(
"color"
,
"#888"
);
collect_hidden
.
attr
(
'data-action'
,
1
);
collect_hidden
.
attr
(
'data-action'
,
1
);
}
}
return
true
;
return
true
;
}
else
{
}
else
{
ui
.
error
(
res
.
message
);
ui
.
error
(
res
.
message
);
return
false
;
return
false
;
}
}
...
...
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