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
b7c6686e
Commit
b7c6686e
authored
Jun 05, 2020
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
0b1b54b9
42c29e3e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
210 additions
and
160 deletions
+210
-160
addons/theme/stv1/_static/images/noavatar/big.jpg
+0
-0
addons/theme/stv1/_static/images/noavatar/big2.jpg
+0
-0
apps/course/Lib/Action/PayVideoAction.class.php
+0
-1
apps/course/Tpl/default/Video/view_w3g.html
+15
-1
apps/exams/Lib/Action/AdminPaperAction.class.php
+17
-3
apps/exams/Lib/Model/ExamsPaperModel.class.php
+14
-0
apps/home/Tpl/default/Home/exams_w3g.html
+164
-155
No files found.
addons/theme/stv1/_static/images/noavatar/big.jpg
View file @
b7c6686e
7.22 KB
|
W:
|
H:
37.6 KB
|
W:
|
H:
2-up
Swipe
Onion skin
addons/theme/stv1/_static/images/noavatar/big2.jpg
0 → 100644
View file @
b7c6686e
7.22 KB
apps/course/Lib/Action/PayVideoAction.class.php
View file @
b7c6686e
...
@@ -2633,7 +2633,6 @@ class PayVideoAction extends CommonAction
...
@@ -2633,7 +2633,6 @@ class PayVideoAction extends CommonAction
$exams_module_id
=
D
(
'ExamsPaper'
,
'exams'
)
->
where
([
'exams_paper_id'
=>
$vid
])
->
getField
(
'exams_module_id'
);
$exams_module_id
=
D
(
'ExamsPaper'
,
'exams'
)
->
where
([
'exams_paper_id'
=>
$vid
])
->
getField
(
'exams_module_id'
);
$url
=
U
(
'exams/Index/paper'
,
[
'c'
=>
0
,
'module_id'
=>
$exams_module_id
]);
$url
=
U
(
'exams/Index/paper'
,
[
'c'
=>
0
,
'module_id'
=>
$exams_module_id
]);
$url
=
U
(
'/'
);
$url
=
U
(
'/'
);
}
elseif
(
$vtype
==
'zy_classes'
)
{
}
elseif
(
$vtype
==
'zy_classes'
)
{
$url
=
U
(
'course/Classes/view'
,
array
(
'id'
=>
$vid
));
$url
=
U
(
'course/Classes/view'
,
array
(
'id'
=>
$vid
));
}
}
...
...
apps/course/Tpl/default/Video/view_w3g.html
View file @
b7c6686e
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<div
@
click=
"onTapCourse(child, item)"
v-for=
"(child, idx) in item.child"
:key=
"idx"
class=
"course_each layout_v"
>
<div
@
click=
"onTapCourse(child, item)"
v-for=
"(child, idx) in item.child"
:key=
"idx"
class=
"course_each layout_v"
>
<div
class=
"layout_h"
style=
"margin-left: 0.75rem;margin-right: 0.75rem;"
>
<div
class=
"layout_h"
style=
"margin-left: 0.75rem;margin-right: 0.75rem;"
>
<van-icon
size=
"16"
:name=
"isVideoLocked(child) ? '__THEME__/img/locked.png' : '__THEME__/img/unlocked.png'"
></van-icon>
<van-icon
size=
"16"
:name=
"isVideoLocked(child) ? '__THEME__/img/locked.png' : '__THEME__/img/unlocked.png'"
></van-icon>
<div
class=
"layout_v weight_full"
style=
"margin-left: 0.5rem;"
>
<div
@
click=
"subVideo(child)"
class=
"layout_v weight_full"
style=
"margin-left: 0.5rem;"
>
<span
class=
"text_14_400 color_333333"
>
{{child.title}}
</span>
<span
class=
"text_14_400 color_333333"
>
{{child.title}}
</span>
<span
class=
"text_12_400 color_999999"
style=
"margin-top: 0.25rem;"
>
{{child.duration}}
</span>
<span
class=
"text_12_400 color_999999"
style=
"margin-top: 0.25rem;"
>
{{child.duration}}
</span>
</div>
</div>
...
@@ -232,6 +232,20 @@
...
@@ -232,6 +232,20 @@
return
false
return
false
}
else
{
}
else
{
return
child
.
is_free
!=
1
return
child
.
is_free
!=
1
// return this.price != 0;
}
}
},
subVideo
:
function
()
{
// let isVideoLocked = this.isVideoLocked(child);
return
function
(
child
)
{
if
(
!
this
.
isVideoLocked
(
child
))
{
// window.location.href = 1;
//
<
a
href
=
"{:U('course/Video/watch',array('id'=>$vo1['vid'],'s_id'=>$vo1['id']))}"
>
let
url
=
"{:U('course/Video/watch')}"
;
url
=
url
.
replace
(
'[id]'
,
child
.
vid
);
url
=
url
.
replace
(
'[s_id]'
,
child
.
id
);
window
.
location
.
href
=
url
;
}
}
}
}
},
},
...
...
apps/exams/Lib/Action/AdminPaperAction.class.php
View file @
b7c6686e
...
@@ -172,6 +172,13 @@ class AdminPaperAction extends AdministratorAction
...
@@ -172,6 +172,13 @@ class AdminPaperAction extends AdministratorAction
// }else{
// }else{
$data
[
'level'
]
=
intval
(
$_POST
[
'level'
]);
$data
[
'level'
]
=
intval
(
$_POST
[
'level'
]);
// }
// }
$attache_id
=
''
;
$attache_ids
=
explode
(
'|'
,
$_POST
[
'attachment_ids'
]);
if
(
!
empty
(
$attache_ids
))
{
$attache_id
=
array_pop
(
array_filter
(
$attache_ids
));
}
$data
[
'attachment'
]
=
$attache_id
;
$data
[
'reply_time'
]
=
intval
(
$_POST
[
'reply_time'
]);
$data
[
'reply_time'
]
=
intval
(
$_POST
[
'reply_time'
]);
$data
[
'exams_module_id'
]
=
intval
(
$_POST
[
'exams_module_id'
]);
$data
[
'exams_module_id'
]
=
intval
(
$_POST
[
'exams_module_id'
]);
$data
[
'exams_paper_title'
]
=
t
(
$_POST
[
'exams_paper_title'
]);
$data
[
'exams_paper_title'
]
=
t
(
$_POST
[
'exams_paper_title'
]);
...
@@ -196,7 +203,7 @@ class AdminPaperAction extends AdministratorAction
...
@@ -196,7 +203,7 @@ class AdminPaperAction extends AdministratorAction
}
}
exit
;
exit
;
}
}
$this
->
pageKeyList
=
[
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
,
'exams_limit'
,
'best'
,
'is_rand'
,
'start_time'
,
'end_time'
,
'assembly_type'
,
'is_screen'
,
'price'
,
'show_user_group'
,
'sort'
,
'description'
];
$this
->
pageKeyList
=
[
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
,
'exams_limit'
,
'best'
,
'is_rand'
,
'start_time'
,
'end_time'
,
'assembly_type'
,
'is_screen'
,
'
attachment'
,
'
price'
,
'show_user_group'
,
'sort'
,
'description'
];
$this
->
notEmpty
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
];
$this
->
notEmpty
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
];
ob_start
();
ob_start
();
echo
W
(
'CategoryLevel'
,
array
(
'table'
=>
'exams_subject'
,
'id'
=>
'exams_subject_id'
));
echo
W
(
'CategoryLevel'
,
array
(
'table'
=>
'exams_subject'
,
'id'
=>
'exams_subject_id'
));
...
@@ -289,6 +296,12 @@ class AdminPaperAction extends AdministratorAction
...
@@ -289,6 +296,12 @@ class AdminPaperAction extends AdministratorAction
if
(
end
(
$subjectArr
)
==
0
)
{
if
(
end
(
$subjectArr
)
==
0
)
{
array_pop
(
$subjectArr
);
array_pop
(
$subjectArr
);
}
}
$attache_id
=
''
;
$attache_ids
=
explode
(
'|'
,
$_POST
[
'attachment_ids'
]);
if
(
!
empty
(
$attache_ids
))
{
$attache_id
=
array_pop
(
array_filter
(
$attache_ids
));
}
$data
[
'exams_subject_id'
]
=
end
(
$subjectArr
);
$data
[
'exams_subject_id'
]
=
end
(
$subjectArr
);
$data
[
'description'
]
=
t
(
$_POST
[
'description'
]);
$data
[
'description'
]
=
t
(
$_POST
[
'description'
]);
$data
[
'level'
]
=
intval
(
$_POST
[
'level'
]);
$data
[
'level'
]
=
intval
(
$_POST
[
'level'
]);
...
@@ -308,6 +321,8 @@ class AdminPaperAction extends AdministratorAction
...
@@ -308,6 +321,8 @@ class AdminPaperAction extends AdministratorAction
$data
[
'assembly_type'
]
=
isset
(
$_POST
[
'assembly_type'
])
?
intval
(
$_POST
[
'assembly_type'
])
:
0
;
$data
[
'assembly_type'
]
=
isset
(
$_POST
[
'assembly_type'
])
?
intval
(
$_POST
[
'assembly_type'
])
:
0
;
$data
[
'best'
]
=
isset
(
$_POST
[
'best'
])
?
intval
(
$_POST
[
'best'
])
:
0
;
$data
[
'best'
]
=
isset
(
$_POST
[
'best'
])
?
intval
(
$_POST
[
'best'
])
:
0
;
$data
[
'price'
]
=
t
(
$_POST
[
'price'
]);
$data
[
'price'
]
=
t
(
$_POST
[
'price'
]);
$data
[
'attachment'
]
=
$attache_id
;
if
(
M
(
'exams_paper'
)
->
where
([
'exams_paper_id'
=>
$paper_id
])
->
save
(
$data
))
{
if
(
M
(
'exams_paper'
)
->
where
([
'exams_paper_id'
=>
$paper_id
])
->
save
(
$data
))
{
$this
->
success
(
'编辑成功'
);
$this
->
success
(
'编辑成功'
);
}
else
{
}
else
{
...
@@ -322,7 +337,7 @@ class AdminPaperAction extends AdministratorAction
...
@@ -322,7 +337,7 @@ class AdminPaperAction extends AdministratorAction
$this
->
error
(
"未找到编辑的试卷"
);
$this
->
error
(
"未找到编辑的试卷"
);
}
}
$this
->
pageTab
[]
=
array
(
'title'
=>
'编辑'
,
'tabHash'
=>
'edit'
,
'url'
=>
U
(
'exams/AdminPaper/edit'
,
[
'paper_id'
=>
$paper_id
]));
$this
->
pageTab
[]
=
array
(
'title'
=>
'编辑'
,
'tabHash'
=>
'edit'
,
'url'
=>
U
(
'exams/AdminPaper/edit'
,
[
'paper_id'
=>
$paper_id
]));
$this
->
pageKeyList
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
,
'exams_limit'
,
'best'
,
'is_rand'
,
'start_time'
,
'end_time'
,
'assembly_type'
,
'is_screen'
,
'price'
,
'show_user_group'
,
'sort'
,
'description'
];
$this
->
pageKeyList
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
,
'exams_limit'
,
'best'
,
'is_rand'
,
'start_time'
,
'end_time'
,
'assembly_type'
,
'is_screen'
,
'
attachment'
,
'
price'
,
'show_user_group'
,
'sort'
,
'description'
];
$this
->
notEmpty
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
];
$this
->
notEmpty
=
[
'exams_paper_id'
,
'exams_subject_id'
,
'exams_module_id'
,
'level'
,
'exams_paper_title'
,
'reply_time'
];
ob_start
();
ob_start
();
echo
W
(
'CategoryLevel'
,
array
(
'table'
=>
'exams_subject'
,
'id'
=>
'exams_subject_id'
,
'default'
=>
$paper
[
'paper_subject_fullpath'
]));
echo
W
(
'CategoryLevel'
,
array
(
'table'
=>
'exams_subject'
,
'id'
=>
'exams_subject_id'
,
'default'
=>
$paper
[
'paper_subject_fullpath'
]));
...
@@ -351,7 +366,6 @@ class AdminPaperAction extends AdministratorAction
...
@@ -351,7 +366,6 @@ class AdminPaperAction extends AdministratorAction
}
else
{
}
else
{
$ug_map
=
'user_group_id != 1'
;
$ug_map
=
'user_group_id != 1'
;
}
}
$this
->
opt
[
'show_user_group'
]
=
model
(
'UserGroup'
)
->
where
(
$ug_map
)
->
getField
(
'user_group_id,user_group_name'
);
$this
->
opt
[
'show_user_group'
]
=
model
(
'UserGroup'
)
->
where
(
$ug_map
)
->
getField
(
'user_group_id,user_group_name'
);
$paper
[
'start_time'
]
=
date
(
'Y-m-d H:i'
,
$paper
[
'start_time'
]);
$paper
[
'start_time'
]
=
date
(
'Y-m-d H:i'
,
$paper
[
'start_time'
]);
$paper
[
'end_time'
]
=
date
(
'Y-m-d H:i'
,
$paper
[
'end_time'
]);
$paper
[
'end_time'
]
=
date
(
'Y-m-d H:i'
,
$paper
[
'end_time'
]);
...
...
apps/exams/Lib/Model/ExamsPaperModel.class.php
View file @
b7c6686e
...
@@ -45,6 +45,17 @@ class ExamsPaperModel extends Model
...
@@ -45,6 +45,17 @@ class ExamsPaperModel extends Model
return
$list
;
return
$list
;
}
}
protected
function
getAttachPathByAttachId
(
$attachid
)
{
if
(
empty
(
$attachid
))
{
return
''
;
}
if
(
$attachInfo
=
model
(
'Attach'
)
->
getAttachById
(
$attachid
))
{
return
'/data/upload/'
.
$attachInfo
[
'save_path'
]
.
$attachInfo
[
'save_name'
];
}
else
{
return
''
;
}
}
/**
/**
* 数据处理
* 数据处理
* @Author MartinSun<syh@sunyonghong.com>
* @Author MartinSun<syh@sunyonghong.com>
...
@@ -62,6 +73,9 @@ class ExamsPaperModel extends Model
...
@@ -62,6 +73,9 @@ class ExamsPaperModel extends Model
$data
[
$key
][
'exams_module_title'
]
=
$this
->
getModuleTitleAttr
(
$v
[
'exams_module_id'
]);
$data
[
$key
][
'exams_module_title'
]
=
$this
->
getModuleTitleAttr
(
$v
[
'exams_module_id'
]);
$data
[
$key
][
'level_title'
]
=
$this
->
getLevelTitle
(
$v
[
'level'
]);
$data
[
$key
][
'level_title'
]
=
$this
->
getLevelTitle
(
$v
[
'level'
]);
$data
[
$key
][
'is_buy'
]
=
$this
->
isBuy
(
$v
[
'exams_paper_id'
],
$this
->
mid
);
$data
[
$key
][
'is_buy'
]
=
$this
->
isBuy
(
$v
[
'exams_paper_id'
],
$this
->
mid
);
if
(
$data
[
$key
][
'is_buy'
]
||
$v
[
'price'
]
==
0
)
{
$data
[
$key
][
'attach'
]
=
$this
->
getAttachPathByAttachId
(
$v
[
'attachment'
]);
}
// 判断自动组卷(1)和手动组卷
// 判断自动组卷(1)和手动组卷
if
(
$v
[
'assembly_type'
]
==
1
)
{
if
(
$v
[
'assembly_type'
]
==
1
)
{
$paper_options
=
unserialize
(
$v
[
'paper_options'
]);
$paper_options
=
unserialize
(
$v
[
'paper_options'
]);
...
...
apps/home/Tpl/default/Home/exams_w3g.html
View file @
b7c6686e
<include
file=
"__THEME__/public_header_w3g"
/>
<include
file=
"__THEME__/public_header_w3g"
/>
<div
id=
"app"
>
<div
id=
"app"
>
<div
class=
"layout_v tab_container"
>
<div
class=
"layout_v tab_container"
>
<van-tabs
:border=
"false"
v-model=
"tab"
sticky
@
change=
"onTopTab"
line-width=
"72px"
line-height=
"4px"
background=
"white"
<van-tabs
:border=
"false"
v-model=
"tab"
sticky
@
change=
"onTopTab"
line-width=
"72px"
line-height=
"4px"
background=
"white"
color=
"#A3E460"
title-inactive-color=
"#333333"
title-active-color=
"#A3E460"
>
color=
"#A3E460"
title-inactive-color=
"#333333"
title-active-color=
"#A3E460"
>
<van-tab>
<van-tab>
<span
slot=
"title"
v-bind:class=
"tab == 0 ? 'tab_text_selected' : 'tab_text_normal'"
>
<span
slot=
"title"
v-bind:class=
"tab == 0 ? 'tab_text_selected' : 'tab_text_normal'"
>
真题演练
真题演练
</span>
</span>
<van-sticky
:offset-top=
"44"
>
<van-sticky
:offset-top=
"44"
>
<div
class=
"layout_v"
>
<div
class=
"layout_v"
>
<van-dropdown-menu
active-color=
"#333333"
>
<van-dropdown-menu
active-color=
"#333333"
>
<van-dropdown-item
title=
"筛选"
ref=
"item"
>
<van-dropdown-item
title=
"筛选"
ref=
"item"
>
<div
class=
"drop_down_grid"
>
<div
class=
"drop_down_grid"
>
<div
@
click=
"onCondition(item)"
v-for=
"(item, index) in condition"
:key=
"index"
:class=
"item.select ? 'drop_down_option_selected' : 'drop_down_option'"
>
<div
@
click=
"onCondition(item)"
v-for=
"(item, index) in condition"
:key=
"index"
:class=
"item.select ? 'drop_down_option_selected' : 'drop_down_option'"
>
<span
class=
"van-ellipsis"
>
{{item.title}}
</span>
<span
class=
"van-ellipsis"
>
{{item.title}}
</span>
</div>
</div>
</div>
</div>
</van-dropdown-item>
</van-dropdown-item>
</van-dropdown-menu>
</van-dropdown-menu>
<div
class=
"drop_down_selected_container"
>
<div
class=
"drop_down_selected_container"
>
<div
v-for=
"(item, index) in selectedCondition"
:key=
"index"
class=
"color_primary text_14_400 drop_down_selected_item"
>
<div
v-for=
"(item, index) in selectedCondition"
:key=
"index"
class=
"color_primary text_14_400 drop_down_selected_item"
>
<span>
{{item.title}}
</span>
<span>
{{item.title}}
</span>
</div>
</div>
</div>
</div>
</div>
</div>
</van-sticky>
</van-sticky>
<div
class=
"layout_v list_container"
>
<div
class=
"layout_v list_container"
>
<!-- 项目1 -->
<!-- 项目1 -->
<div
v-for=
"(item, index) in zhenti"
:key=
"index"
class=
"class_item layout_h"
>
<div
v-for=
"(item, index) in zhenti"
:key=
"index"
class=
"class_item layout_h"
>
<div
class=
"class_left layout_v weight_full"
>
<div
class=
"class_left layout_v weight_full"
>
<div
class=
"layout_h"
>
<div
class=
"layout_h"
>
<div
v-if=
"item.price > 0"
class=
"mark_orange layout_center"
>
付费
</div>
<div
v-if=
"item.price > 0"
class=
"mark_orange layout_center"
>
付费
</div>
<div
v-if=
"item.price == 0"
class=
"mark_green layout_center"
>
免费
</div>
<div
v-if=
"item.price == 0"
class=
"mark_green layout_center"
>
免费
</div>
<span
class=
"text_14_600 color_333333 weight_full van-multi-ellipsis--l2"
style=
"margin-left: 0.625rem;"
>
{{item.title}}
</span>
<span
class=
"text_14_600 color_333333 weight_full van-multi-ellipsis--l2"
style=
"margin-left: 0.625rem;"
>
{{item.title}}
</span>
</div>
</div>
<div
class=
"layout_h"
style=
"margin-top: 1.25rem;"
>
<div
class=
"layout_h"
style=
"margin-top: 1.25rem;"
>
<span
class=
"text_12_400 color_999999"
>
题数:{{item.count}}
</span>
<span
class=
"text_12_400 color_999999"
>
题数:{{item.count}}
</span>
<span
class=
"class_attr text_12_400 color_999999"
>
推荐用时:{{item.time}}m
</span>
<span
class=
"class_attr text_12_400 color_999999"
>
推荐用时:{{item.time}}m
</span>
<span
class=
"class_attr text_12_400 color_999999"
>
{{item.person}}
</span>
<span
class=
"class_attr text_12_400 color_999999"
>
{{item.person}}
</span>
</div>
</div>
</div>
</div>
<div
class=
"class_right layout_center"
>
<div
class=
"class_right layout_center"
>
<div
@
click=
"
onPay(item)"
v-if=
"item.price > 0"
class=
"button_orange layout_center"
>
¥{{item.price}}
</div>
<div
@
click=
"
startDo(item)"
v-if=
"item.price == 0 || item.is_buy"
class=
"button_green layout_center"
>
开始做题
</div>
<div
@
click=
"
startDo(item)"
v-if=
"item.price == 0"
class=
"button_green layout_center"
>
开始做题
</div>
<div
@
click=
"
onPay(item)"
v-else-if=
"item.price > 0"
class=
"button_orange layout_center"
>
¥{{item.price}}
</div>
</div>
</div>
</div>
</div>
<span
style=
"margin-top: 35vh;"
v-if=
"zhenti.length == 0"
class=
"text_14_400 color_999999 self_center"
>
没有找到!
</span>
<span
style=
"margin-top: 35vh;"
v-if=
"zhenti.length == 0"
class=
"text_14_400 color_999999 self_center"
>
没有找到!
</span>
</div>
</div>
</van-tab>
</van-tab>
<van-tab>
<van-tab>
<span
slot=
"title"
v-bind:class=
"tab == 1 ? 'tab_text_selected' : 'tab_text_normal'"
>
<span
slot=
"title"
v-bind:class=
"tab == 1 ? 'tab_text_selected' : 'tab_text_normal'"
>
真题下载
真题下载
</span>
</span>
<van-sticky
:offset-top=
"44"
>
<van-sticky
:offset-top=
"44"
>
<van-dropdown-menu
active-color=
"#333333"
>
<van-dropdown-menu
active-color=
"#333333"
>
<van-dropdown-item
title=
"筛选"
ref=
"item"
>
<van-dropdown-item
title=
"筛选"
ref=
"item"
>
<div
class=
"drop_down_grid"
>
<div
class=
"drop_down_grid"
>
<div
@
click=
"onCondition(item)"
v-for=
"(item, index) in condition"
:key=
"index"
:class=
"item.select ? 'drop_down_option_selected' : 'drop_down_option'"
>
<div
@
click=
"onCondition(item)"
v-for=
"(item, index) in condition"
:key=
"index"
:class=
"item.select ? 'drop_down_option_selected' : 'drop_down_option'"
>
<span
class=
"van-ellipsis"
>
{{item.title}}
</span>
<span
class=
"van-ellipsis"
>
{{item.title}}
</span>
</div>
</div>
</div>
</div>
</van-dropdown-item>
</van-dropdown-item>
</van-dropdown-menu>
</van-dropdown-menu>
<div
class=
"drop_down_selected_container"
>
<div
class=
"drop_down_selected_container"
>
<div
v-for=
"(item, index) in selectedCondition"
:key=
"index"
class=
"color_primary text_14_400 drop_down_selected_item"
>
<div
v-for=
"(item, index) in selectedCondition"
:key=
"index"
class=
"color_primary text_14_400 drop_down_selected_item"
>
<span>
{{item.title}}
</span>
<span>
{{item.title}}
</span>
</div>
</div>
</div>
</div>
</van-sticky>
</van-sticky>
<div
class=
"layout_v list_container"
>
<div
class=
"layout_v list_container"
>
<!-- 项目1 -->
<!-- 项目1 -->
<div
v-for=
"(item, index) in download"
:key=
"index"
class=
"class_item layout_h"
>
<div
v-for=
"(item, index) in download"
:key=
"index"
class=
"class_item layout_h"
>
<div
class=
"class_left layout_v weight_full"
>
<div
class=
"class_left layout_v weight_full"
>
<div
class=
"layout_h"
>
<div
class=
"layout_h"
>
<div
v-if=
"item.price > 0"
class=
"mark_orange layout_center"
>
付费
</div>
<div
v-if=
"item.price > 0"
class=
"mark_orange layout_center"
>
付费
</div>
<div
v-if=
"item.price == 0"
class=
"mark_green layout_center"
>
免费
</div>
<div
v-if=
"item.price == 0"
class=
"mark_green layout_center"
>
免费
</div>
<span
class=
"text_14_600 color_333333 weight_full van-multi-ellipsis--l2"
style=
"margin-left: 0.625rem;"
>
{{item.title}}
</span>
<span
class=
"text_14_600 color_333333 weight_full van-multi-ellipsis--l2"
style=
"margin-left: 0.625rem;"
>
{{item.title}}
</span>
</div>
</div>
<div
class=
"layout_h"
style=
"margin-top: 1.25rem;"
>
<div
class=
"layout_h"
style=
"margin-top: 1.25rem;"
>
<span
class=
"text_12_400 color_999999"
>
题数:{{item.count}}
</span>
<span
class=
"text_12_400 color_999999"
>
题数:{{item.count}}
</span>
<span
class=
"class_attr text_12_400 color_999999"
>
推荐用时:{{item.time}}m
</span>
<span
class=
"class_attr text_12_400 color_999999"
>
推荐用时:{{item.time}}m
</span>
<span
class=
"class_attr text_12_400 color_999999"
>
{{item.person}}
</span>
<span
class=
"class_attr text_12_400 color_999999"
>
{{item.person}}
</span>
</div>
</div>
</div>
</div>
<div
class=
"class_right layout_center"
>
<div
class=
"class_right layout_center"
>
<div
@
click=
"onPay(item)"
v-if=
"item.price > 0"
class=
"button_orange layout_center"
>
¥{{item.price}}
</div>
<div
v-if=
"item.price == 0|| item.is_buy"
@
click=
"onDownload(item)"
class=
"button_green layout_center"
>
下载试题
</div>
<div
v-if=
"item.price == 0"
class=
"button_green layout_center"
>
下载试题
</div>
<div
@
click=
"onPay(item)"
v-else-if=
"item.price > 0"
class=
"button_orange layout_center"
>
¥{{item.price}}
</div>
</div>
</div>
</div>
</div>
<span
style=
"margin-top: 35vh;"
v-if=
"download.length == 0"
class=
"text_14_400 color_999999 self_center"
>
没有找到!
</span>
<span
style=
"margin-top: 35vh;"
v-if=
"download.length == 0"
class=
"text_14_400 color_999999 self_center"
>
没有找到!
</span>
</div>
</div>
</van-tab>
</van-tab>
<van-tab>
<van-tab>
<span
slot=
"title"
v-bind:class=
"tab == 2 ? 'tab_text_selected' : 'tab_text_normal'"
>
<span
slot=
"title"
v-bind:class=
"tab == 2 ? 'tab_text_selected' : 'tab_text_normal'"
>
我的题库
我的题库
</span>
</span>
<div
class=
"layout_v zhenti_my_collect_list_container"
>
<div
class=
"layout_v zhenti_my_collect_list_container"
>
<div
class=
"layout_h zhenti_tab"
>
<div
class=
"layout_h zhenti_tab"
>
<div
@
click=
"onMyTab(0)"
class=
"layout_center weight_full"
:class=
"myTab == 0 ? 'zhenti_tab_selected' : 'zhenti_tab_normal'"
>
已做
</div>
<div
@
click=
"onMyTab(0)"
class=
"layout_center weight_full"
:class=
"myTab == 0 ? 'zhenti_tab_selected' : 'zhenti_tab_normal'"
>
已做
</div>
<div
@
click=
"onMyTab(1)"
class=
"layout_center weight_full"
:class=
"myTab == 1 ? 'zhenti_tab_selected' : 'zhenti_tab_normal'"
>
收藏
</div>
<div
@
click=
"onMyTab(1)"
class=
"layout_center weight_full"
:class=
"myTab == 1 ? 'zhenti_tab_selected' : 'zhenti_tab_normal'"
>
收藏
</div>
</div>
</div>
<template
v-if=
"myTab == 1"
>
<template
v-if=
"myTab == 1"
>
<div
class=
"zhenti_my_collect_cell layout_v"
>
<div
class=
"zhenti_my_collect_cell layout_v"
>
...
@@ -129,70 +129,70 @@
...
@@ -129,70 +129,70 @@
</div>
</div>
</div>
</div>
<span
style=
"margin-top: 35vh;"
v-if=
"myYiZuo.length == 0"
class=
"text_14_400 color_999999 self_center"
>
没有找到!
</span>
<span
style=
"margin-top: 35vh;"
v-if=
"myYiZuo.length == 0"
class=
"text_14_400 color_999999 self_center"
>
没有找到!
</span>
</template>
</template>
</div>
</div>
</van-tab>
</van-tab>
</van-tabs>
</van-tabs>
</div>
</div>
<van-tabbar
v-model=
"active"
@
change=
"onChange"
:fixed=
"true"
:route=
"false"
:safe-area-inset-bottom=
"true"
<van-tabbar
v-model=
"active"
@
change=
"onChange"
:fixed=
"true"
:route=
"false"
:safe-area-inset-bottom=
"true"
active-color=
"#65C000"
inactive-color=
"#363636"
>
active-color=
"#65C000"
inactive-color=
"#363636"
>
<van-tabbar-item>
<van-tabbar-item>
<span
class=
"text_10_400"
>
名师课堂
</span>
<span
class=
"text_10_400"
>
名师课堂
</span>
<template
#
icon=
"props"
>
<template
#
icon=
"props"
>
<a
href=
"{:U('classroom/Index/index')}"
>
<a
href=
"{:U('classroom/Index/index')}"
>
<img
:src=
"props.active ? '__THEME__/img/minshi.png' : '__THEME__/img/minshi_s.png'"
/>
<img
:src=
"props.active ? '__THEME__/img/minshi.png' : '__THEME__/img/minshi_s.png'"
/>
</a>
</a>
</template>
</template>
</van-tabbar-item>
</van-tabbar-item>
<van-tabbar-item>
<van-tabbar-item>
<span
class=
"text_10_400"
>
真题题库
</span>
<span
class=
"text_10_400"
>
真题题库
</span>
<template
#
icon=
"props"
>
<template
#
icon=
"props"
>
<a
href=
"{:U('home/Home/exams')}"
>
<a
href=
"{:U('home/Home/exams')}"
>
<img
:src=
"props.active ? '__THEME__/img/zhenti.png' : '__THEME__/img/zhenti_s.png'"
/>
<img
:src=
"props.active ? '__THEME__/img/zhenti.png' : '__THEME__/img/zhenti_s.png'"
/>
</a>
</a>
</template>
</template>
</van-tabbar-item>
</van-tabbar-item>
<van-tabbar-item>
<van-tabbar-item>
<span
class=
"text_10_400"
>
考试咨询
</span>
<span
class=
"text_10_400"
>
考试咨询
</span>
<template
#
icon=
"props"
>
<template
#
icon=
"props"
>
<a
href=
"{:U('classroom/Index/find')}"
>
<a
href=
"{:U('classroom/Index/find')}"
>
<img
:src=
"props.active ? '__THEME__/img/zixun.png' : '__THEME__/img/zixun_s.png'"
/>
<img
:src=
"props.active ? '__THEME__/img/zixun.png' : '__THEME__/img/zixun_s.png'"
/>
</a>
</a>
</template>
</template>
</van-tabbar-item>
</van-tabbar-item>
<van-tabbar-item>
<van-tabbar-item>
<span
class=
"text_10_400"
>
会员中心
</span>
<span
class=
"text_10_400"
>
会员中心
</span>
<template
#
icon=
"props"
>
<template
#
icon=
"props"
>
<if
condition=
"$_SESSION['mid']"
>
<if
condition=
"$_SESSION['mid']"
>
<a
href=
"{:U('home/User/index')}"
>
<a
href=
"{:U('home/User/index')}"
>
<else
/>
<else
/>
<a
href=
"{:U('basic/Passport/login')}"
>
<a
href=
"{:U('basic/Passport/login')}"
>
</if>
</if>
<img
:src=
"props.active ? '__THEME__/img/huiyuan.png' : '__THEME__/img/huiyuan_s.png'"
/>
<img
:src=
"props.active ? '__THEME__/img/huiyuan.png' : '__THEME__/img/huiyuan_s.png'"
/>
</a>
</a>
</template>
</template>
</van-tabbar-item>
</van-tabbar-item>
</van-tabbar>
</van-tabbar>
</div>
</div>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
new
Vue
({
new
Vue
({
el
:
'#app'
,
el
:
'#app'
,
data
:
function
()
{
data
:
function
()
{
return
{
return
{
active
:
1
,
active
:
1
,
tab
:
0
,
tab
:
0
,
myTab
:
0
,
myTab
:
0
,
condition
:
[],
condition
:
[],
zhenti
:
[],
zhenti
:
[],
download
:
[],
download
:
[],
myYiZuo
:
[],
myYiZuo
:
[],
myCollect
:
[]
myCollect
:
[]
}
}
},
},
created
:
function
()
{
created
:
function
()
{
},
},
mounted
:
function
(){
mounted
:
function
(){
$
(
"#preloader"
).
hide
();
$
(
"#preloader"
).
hide
();
...
@@ -217,18 +217,18 @@
...
@@ -217,18 +217,18 @@
return
f
.
length
>
0
?
f
[
0
].
id
:
''
return
f
.
length
>
0
?
f
[
0
].
id
:
''
}
}
}
}
},
},
methods
:
{
methods
:
{
onChange
:
function
(
tab
)
{
onChange
:
function
(
tab
)
{
},
},
startDo
:
function
(
item
)
{
startDo
:
function
(
item
)
{
let
url
=
"{:U('exams/index/examsroom')}"
+
"&paper_id="
+
item
.
id
+
"&joinType=1"
let
url
=
"{:U('exams/index/examsroom')}"
+
"&paper_id="
+
item
.
id
+
"&joinType=1"
window
.
location
.
href
=
url
window
.
location
.
href
=
url
},
},
onPay
:
function
(
item
)
{
onPay
:
function
(
item
)
{
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
...
@@ -247,7 +247,13 @@
...
@@ -247,7 +247,13 @@
}
}
})
})
},
},
onDownload
:
function
(
item
){
if
(
item
.
attach
)
{
window
.
location
.
href
=
item
.
attach
;
}
},
onTopTab
:
function
(
tab
)
{
onTopTab
:
function
(
tab
)
{
if
(
this
.
tab
==
0
)
{
if
(
this
.
tab
==
0
)
{
this
.
loadZhenti
()
this
.
loadZhenti
()
...
@@ -255,15 +261,15 @@
...
@@ -255,15 +261,15 @@
this
.
loadDownload
()
this
.
loadDownload
()
}
else
{
}
else
{
this
.
onMyTab
(
this
.
myTab
)
this
.
onMyTab
(
this
.
myTab
)
}
}
},
},
onMyTab
:
function
(
tab
)
{
onMyTab
:
function
(
tab
)
{
this
.
myTab
=
tab
this
.
myTab
=
tab
if
(
tab
==
0
)
{
if
(
tab
==
0
)
{
this
.
loadMy
()
this
.
loadMy
()
}
else
{
}
else
{
}
}
},
},
onCondition
:
function
(
condition
)
{
onCondition
:
function
(
condition
)
{
this
.
condition
.
forEach
(
r
=>
{
r
.
select
=
false
})
this
.
condition
.
forEach
(
r
=>
{
r
.
select
=
false
})
...
@@ -292,7 +298,8 @@
...
@@ -292,7 +298,8 @@
price
:
r
.
price
,
price
:
r
.
price
,
count
:
r
.
questions_count
,
count
:
r
.
questions_count
,
time
:
r
.
reply_time
,
time
:
r
.
reply_time
,
person
:
r
.
exams_user
+
"已做"
person
:
r
.
exams_user
+
"已做"
,
is_buy
:
r
.
is_buy
}
}
}))
}))
if
(
that
.
condition
.
length
==
0
)
{
if
(
that
.
condition
.
length
==
0
)
{
...
@@ -325,7 +332,9 @@
...
@@ -325,7 +332,9 @@
price
:
r
.
price
,
price
:
r
.
price
,
count
:
r
.
questions_count
,
count
:
r
.
questions_count
,
time
:
r
.
reply_time
,
time
:
r
.
reply_time
,
person
:
r
.
exams_user
+
"已做"
person
:
r
.
exams_user
+
"已做"
,
is_buy
:
r
.
is_buy
,
attach
:
r
.
attach
}
}
}))
}))
if
(
that
.
condition
.
length
==
0
)
{
if
(
that
.
condition
.
length
==
0
)
{
...
@@ -366,8 +375,8 @@
...
@@ -366,8 +375,8 @@
},
},
//加载我收藏的题
//加载我收藏的题
loadMyTi
:
function
()
{
loadMyTi
:
function
()
{
}
}
}
}
})
})
</script>
</script>
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