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
a8581638
Commit
a8581638
authored
May 19, 2020
by
陈超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A
parent
2ece4a83
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
265 additions
and
0 deletions
+265
-0
apps/home/Tpl/default/Home/exams_w3g_old.html
+265
-0
No files found.
apps/home/Tpl/default/Home/exams_w3g_old.html
0 → 100644
View file @
a8581638
<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/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/exam_2.0.css"
>
<div
class=
"cover"
></div>
<div
class=
"min-height-wrap"
>
<div
class=
"suren-box"
>
<ul
class=
"suren-coas"
>
<li
<
php
>
if(!$_GET['tab'] || $_GET['tab'] == 1){
</php>
class="on"
<php>
}
</php>
>
<a
href=
"{:U('home/Home/exams',['tab'=>1])}"
>
练习记录
</a></li>
<li
<
eq
name=
"Think.get.tab"
value=
"2"
>
class="on"
</eq>
>
<a
href=
"{:U('home/Home/exams',['tab'=>2])}"
>
考试记录
</a></li>
<li
<
eq
name=
"Think.get.tab"
value=
"3"
>
class="on"
</eq>
>
<a
href=
"{:U('home/Home/exams',['tab'=>3])}"
>
错题记录
</a></li>
<li
<
eq
name=
"Think.get.tab"
value=
"4"
>
class="on"
</eq>
>
<a
href=
"{:U('home/Home/exams',['tab'=>4])}"
>
题目收藏
</a></li>
<li
<
eq
name=
"Think.get.tab"
value=
"5"
>
class="on"
</eq>
>
<a
href=
"{:U('home/Home/exams',['tab'=>5])}"
>
高频练习
</a></li>
</ul>
<div
class=
"asmarfr-pr"
>
<switch
name=
"Think.get.tab"
>
<case
value=
"3"
>
<!--错题记录-->
<php>
if($list['data']){
</php>
<ul
class=
"suren-content"
>
<volist
name=
"list.data"
id=
"vo"
>
<li>
<a
href=
"#"
>
<span>
<h4>
{$vo.paper_info.exams_paper_title}
</h4>
<p>
{$vo['update_time']|friendlyDate}
</p>
</span>
<strong>
{$vo.wrong_count}道错题
</strong>
<a
href=
"{:U('exams/Index/wrongExamsroom',['joinType'=>1,'paper_id'=>$vo['exams_paper_id'],'temp'=>$vo['exams_users_id']])}"
class=
'btn exams'
>
错题再练
</a>
<a
class=
'btn del deleteExeams'
data-temp_id=
"{$vo.exams_users_id}"
>
删除
</a>
</a>
</li>
</volist>
</ul>
<php>
}else{
</php>
<include
file=
"__THEME__/no_data_w3g"
/>
<php>
}
</php>
</case>
<case
value=
"4"
>
<!--题目收藏-->
<php>
if($list['data']){
</php>
<ul
class=
"suren-content collection"
>
<volist
name=
"list.data"
id=
"vo"
>
<li>
<a
href=
"#"
>
<span>
<php>
if($vo['question_info']['content']){
</php>
<h4>
{:t($vo['question_info']['content'])}
</h4>
<php>
}else{
</php>
<h4
style=
"color: #F00;"
>
该试题已被删除
</h4>
<php>
}
</php>
<p>
{$vo['ctime']|friendlyDate}
</p>
</span>
<php>
if($vo['question_info']['content']){
</php>
<a
href=
"{:U('exams/Index/showQuestioninfo',['question_id'=>$vo['source_id']])}"
class=
"btn exams"
>
查看题目
</a>
<a
class=
'btn del deleteCollection'
data-question_id=
"{$vo.source_id}"
>
删除
</a>
<php>
}else{
</php>
<a
class=
'btn del deleteCollection'
style=
"right: -95px;"
data-question_id=
"{$vo.source_id}"
>
删除
</a>
<php>
}
</php>
</a>
</li>
</volist>
</ul>
<php>
}else{
</php>
<include
file=
"__THEME__/no_data_w3g"
/>
<php>
}
</php>
</case>
<case
value=
"5"
>
<!--高频练习-->
<php>
if($list['data']){
</php>
<ul
class=
"suren-content"
>
<volist
name=
"list.data"
id=
"vo"
>
<li>
<a
href=
"#"
>
<span>
<h4>
{$vo.exams_paper_title}
</h4>
<p>
{$vo['update_time']|friendlyDate}
</p>
</span>
<strong>
0分
</strong>
<a
href=
"{:U('exams/Index/wrongExamsroom',['joinType'=>1,'paper_id'=>$vo['exams_paper_id'],'temp'=>$vo['exams_users_id'],'is_highwrong'=>1])}"
class=
'btn exams'
>
开始练习
</a>
<!-- <a class='btn del deleteExeams' data-temp_id="{$vo.exams_users_id}">删除</a> -->
</a>
</li>
</volist>
</ul>
<php>
}else{
</php>
<include
file=
"__THEME__/no_data_w3g"
/>
<php>
}
</php>
</case>
<default
/>
<!--练习记录 考试记录-->
<php>
if($list['data']){
</php>
<ul
class=
"suren-content"
>
<volist
name=
"list.data"
id=
"vo"
>
<li>
<span>
<h4>
{$vo.paper_info.exams_paper_title}
<if
condition=
"$vo['course_title']"
><a
href=
"{:U('course/Video/view',array('id'=>$vo['vid']))}"
>
{$vo.course_title}
</a></if></h4>
<p>
{$vo['update_time']|friendlyDate}
</p>
</span>
<php>
if($vo['progress'] == 100){
</php>
<strong>
{$vo.score|default="0"}分
</strong>
<a
href=
"{:U('exams/Index/examsresult',['joinType'=>$vo['exams_mode'],'paper_id'=>$vo['exams_paper_id'],'temp'=>$vo['exams_users_id']])}"
class=
'btn show'
>
查看结果
</a>
<a
class=
'btn del deleteExeams'
data-temp_id=
"{$vo.exams_users_id}"
>
删除
</a>
<php>
}else{
</php>
<i
class=
"icon icon-weiwancheng"
></i>
<a
href=
"{:U('exams/Index/examsroom',['joinType'=>$vo['exams_mode'],'paper_id'=>$vo['exams_paper_id'],'temp'=>$vo['exams_users_id']])}"
class=
'btn exams'
>
继续答题
</a>
<a
class=
'btn del deleteExeams'
data-temp_id=
"{$vo.exams_users_id}"
>
删除
</a>
<php>
}
</php>
</li>
</volist>
</ul>
<php>
}else{
</php>
<include
file=
"__THEME__/no_data_w3g"
/>
<php>
}
</php>
</switch>
</div>
</div>
</div>
<include
file=
"__THEME__/public_footer_w3g"
/>
<script
src=
"{$Think.APPS_URL}/exams/_static/js/public_header_footer_media.js"
></script>
<script
src=
"{$Think.APPS_URL}/exams/_static/js/swipe.js"
charset=
"utf-8"
></script>
<script
type=
"text/javascript"
>
$
(
function
(){
$
(
'.suren-content li'
).
rhuiSwipe
(
'swipeLeft'
,
function
(
event
){
var
left
=
0
;
$
(
this
).
find
(
".btn"
).
each
(
function
(){
left
+=
$
(
this
).
width
();
$
(
this
).
css
({
lineHeight
:
$
(
this
).
height
()
+
'px'
});
});
$
(
this
).
animate
({
left
:
"-"
+
left
+
"px"
},
500
);
$
(
this
).
siblings
().
css
(
"left"
,
"0px"
);
},
{
// 可选参数
isStopPropagation
:
false
,
isPreventDefault
:
false
,
triggerOnMove
:
true
});
$
(
'.suren-content li'
).
rhuiSwipe
(
'swipeRight'
,
function
(
event
){
$
(
this
).
animate
({
left
:
"0px"
},
500
);
$
(
this
).
siblings
().
animate
({
left
:
0
},
500
);
},
{
// 可选参数
isStopPropagation
:
false
,
isPreventDefault
:
false
,
triggerOnMove
:
true
});
$
(
'.suren-content li'
).
click
(
function
(){
if
(
$
(
this
).
css
(
"left"
)
==
'0px'
){
var
left
=
0
;
$
(
this
).
find
(
".btn"
).
each
(
function
(){
left
+=
$
(
this
).
width
();
$
(
this
).
css
({
lineHeight
:
$
(
this
).
height
()
+
'px'
});
});
$
(
this
).
animate
({
left
:
"-"
+
left
+
"px"
},
500
);
$
(
this
).
siblings
().
css
(
"left"
,
"0px"
);
}
else
{
$
(
this
).
animate
({
left
:
"0px"
},
500
);
$
(
this
).
siblings
().
animate
({
left
:
0
},
500
);
}
});
// 删除考试记录
$
(
".deleteExeams"
).
live
(
'click'
,
function
(){
var
temp_id
=
$
(
this
).
data
(
'temp_id'
);
ui
.
confirm
(
'确认删除该记录吗?'
,
{
yes
:
function
()
{
$
.
post
(
'{:U("exams/Index/deleteExeams")}'
,{
temp_id
:
temp_id
},
function
(
res
){
if
(
typeof
(
res
)
!=
"object"
){
try
{
var
res
=
JSON
.
parse
(
res
);
}
catch
(
e
){
ui
.
error
(
"请求出错,请稍后再试"
);
return
false
;
}
}
if
(
res
.
status
==
1
){
ui
.
success
(
res
.
data
.
info
);
window
.
location
.
reload
();
}
else
{
ui
.
error
(
res
.
message
);
return
false
;
}
});
}
});
});
// 取消收藏
$
(
".deleteCollection"
).
live
(
'click'
,
function
(){
var
question_id
=
$
(
this
).
data
(
'question_id'
);
ui
.
confirm
(
'确认删除该试题吗?'
,
{
yes
:
function
()
{
// 后台
$
.
post
(
U
(
'exams/Index/collect'
),{
action
:
0
,
source_id
:
question_id
},
function
(
res
){
if
(
typeof
(
res
)
!=
'object'
){
try
{
var
res
=
JSON
.
parse
(
res
);
}
catch
(
e
){
ui
.
error
(
"处理异常,请重新尝试"
);
return
false
;
}
}
if
(
res
.
status
==
1
){
ui
.
success
(
res
.
data
.
info
);
window
.
location
.
reload
();
return
true
;
}
else
{
ui
.
error
(
res
.
message
);
return
false
;
}
});
}
});
});
var
p
=
1
;
$
(
window
).
scroll
(
function
(){
var
scrollTop
=
$
(
this
).
scrollTop
();
var
scrollHeight
=
$
(
document
).
height
();
var
windowHeight
=
$
(
this
).
height
();
if
(
scrollTop
+
windowHeight
==
scrollHeight
){
if
(
!
p
||
p
>=
parseInt
(
"{$list['totalPages']}"
)){
return
false
;
}
else
{
p
=
p
+
1
;
$
.
ajax
({
type
:
"GET"
,
url
:
"{:U('home/Home/exams',['tab'=>$_GET['tab']])}"
,
data
:{
tab
:
'{$Think.get.tab}'
,
p
:
p
},
dataType
:
"json"
,
success
:
function
(
res
){
if
(
typeof
(
res
)
!=
'object'
){
try
{
var
res
=
JSON
.
parse
(
res
);
}
catch
(
e
){
ui
.
error
(
"处理异常,请重新尝试"
);
return
false
;
}
}
if
(
res
.
status
==
1
){
$
(
".asmarfr-pr ul"
).
append
(
res
.
data
.
html
);
return
true
;
}
}
});
}
}
});
});
</script>
\ No newline at end of file
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