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
8bcd0ac9
Commit
8bcd0ac9
authored
Jul 20, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
1ffa98dd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
23 deletions
+56
-23
apps/classroom/Tpl/default/Index/search_w3g.html
+56
-23
No files found.
apps/classroom/Tpl/default/Index/search_w3g.html
View file @
8bcd0ac9
...
...
@@ -154,7 +154,7 @@
</template>
<template
v-if=
"showList(1)"
>
<div
v-for=
"(item, idx
) in options[1].items"
:key=
"idx
"
class=
"layout_v home_question_item"
>
<div
v-for=
"(item, idx
2) in options[1].items"
:key=
"idx2
"
class=
"layout_v home_question_item"
>
<!--
<div v-if="item.price == 0" class="layout_h">
<div class="home_item_mark_green layout_center">免费</div>
...
...
@@ -179,10 +179,10 @@
<div
v-if=
"item.price > 0"
class=
"home_item_mark_orange layout_center"
>
付费
</div>
<div
v-if=
"item.price == 0"
class=
"home_item_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>
<div
@
click=
"onTapQuestion(item)"
v-if=
"(item.price == 0 || item.is_buy) && item.hasQuestion > 0"
class=
"home_button_green layout_center"
>
开始做题
</div>
<div
@
click=
"onTapQuestion(item)"
v-else-if=
"(item.price == 0 || item.is_buy) && item.hasQuestion <= 0"
class=
"home_button_green layout_center"
>
开始下载
</div>
<div
@
click=
"onTapQuestion(item)"
v-else-if=
"item.price > 0 && item.hasQuestion > 0"
class=
"button_orange layout_center"
>
预览
</div>
<div
@
click=
"onTapQuestion(item)"
v-else-if=
"item.price > 0 && item.hasQuestion <= 0"
class=
"button_orange layout_center"
>
预览下载
</div>
<div
@
click=
"onTapQuestion(item
, idx2
)"
v-if=
"(item.price == 0 || item.is_buy) && item.hasQuestion > 0"
class=
"home_button_green layout_center"
>
开始做题
</div>
<div
@
click=
"onTapQuestion(item
, idx2
)"
v-else-if=
"(item.price == 0 || item.is_buy) && item.hasQuestion <= 0"
class=
"home_button_green layout_center"
>
开始下载
</div>
<div
@
click=
"onTapQuestion(item
, idx2
)"
v-else-if=
"item.price > 0 && item.hasQuestion > 0"
class=
"button_orange layout_center"
>
预览
</div>
<div
@
click=
"onTapQuestion(item
, idx2
)"
v-else-if=
"item.price > 0 && item.hasQuestion <= 0"
class=
"button_orange layout_center"
>
预览下载
</div>
</div>
<div
class=
"layout_h_b"
style=
"margin-top: 0.5rem;"
>
...
...
@@ -340,7 +340,7 @@
items
:
[]
}],
cacheKeyWorlds
:
this
.
getCacheKeyWorlds
(),
yulan
:
false
yulan
:
false
,
}
},
computed
:
{
...
...
@@ -380,36 +380,46 @@
let
url
=
"{:U('course/Video/view')}"
window
.
location
.
href
=
url
.
replace
(
/
\[
.*
?\]
/g
,
item
.
id
)
},
//点击真题
onTapQuestion
:
function
(
item
)
{
var
MID
=
'<php> echo $mid;</php>'
;
onDownload
:
function
()
{
let
item
=
this
.
options
[
1
].
items
[
this
.
yulan
];
let
path
=
item
.
attach
;
let
title
=
item
.
title
;
if
(
path
)
{
var
link
=
document
.
createElement
(
'a'
);
// 设置下载的文件名
link
.
download
=
title
;
link
.
style
.
display
=
'none'
;
//设置下载路径
link
.
href
=
path
;
//触发点击
document
.
body
.
appendChild
(
link
);
link
.
click
();
//移除节点
document
.
body
.
removeChild
(
link
);
this
.
close_yulan
();
}
else
{
alert
(
'当前课程无文件下载'
);
}
},
onPay
:
function
()
{
if
(
MID
<=
0
)
{
ui
.
confirm
(
'请先登录'
,
{
yes
:
function
()
{
yes
:
function
()
{
window
.
location
.
href
=
"{:U('basic/Passport/login')}"
;
}
})
return
}
if
(
item
.
hasQuestion
)
{
let
url
=
"{:U('exams/index/examsroom')}"
+
"&paper_id="
+
item
.
id
+
"&joinType=1"
window
.
location
.
href
=
url
;
}
else
{
}
if
(
item
.
price
==
0
)
{
}
else
{
let
item
=
this
.
options
[
1
].
items
[
this
.
yulan
];
let
id
=
item
.
id
;
$
.
ajax
({
type
:
"POST"
,
url
:
"{:U('exams/index/getPayUrl')}"
,
data
:
{
paper_id
:
item
.
id
,
paper_id
:
id
,
},
dataType
:
"json"
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
var
res
=
getResponseData
(
res
)
if
(
res
.
status
==
1
)
{
window
.
location
.
href
=
res
.
data
...
...
@@ -418,6 +428,29 @@
}
}
})
},
onStart
:
function
(
id
)
{
if
(
MID
<=
0
)
{
ui
.
confirm
(
'请先登录'
,
{
yes
:
function
()
{
window
.
location
.
href
=
"{:U('basic/Passport/login')}"
;
}
})
return
}
let
url
=
"{:U('exams/index/examsroom')}"
+
"&paper_id="
+
id
+
"&joinType=1"
window
.
location
.
href
=
url
},
//点击真题
onTapQuestion
:
function
(
item
,
index
)
{
if
(
item
.
hasQuestion
>
0
)
{
this
.
onStart
(
item
.
id
);
}
else
{
this
.
yulan
=
index
;
if
(
item
.
price
==
0
)
{
this
.
onDownload
();
}
}
},
//点击实物
...
...
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