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
c65282c3
Commit
c65282c3
authored
May 30, 2020
by
冷斌
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix bug
parent
e5fb1e96
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
78 additions
and
61 deletions
+78
-61
apps/classroom/Tpl/default/Index/search_w3g.html
+78
-61
No files found.
apps/classroom/Tpl/default/Index/search_w3g.html
View file @
c65282c3
<!DOCTYPE html>
<!DOCTYPE html>
<html
lang=
"zh-cn"
>
<html
lang=
"zh-cn"
>
<head>
<head>
<title><neq
name=
'_title'
value=
''
>
{$_title} - {$site.site_name}
<else
/>
{$site.site_name} - {$site.site_slogan}
</neq></title>
<title>
<neq
name=
'_title'
value=
''
>
{$_title} - {$site.site_name}
<else/>
{$site.site_name} - {$site.site_slogan}
</neq>
</title>
<meta
charset=
"utf-8"
>
<meta
charset=
"utf-8"
>
<meta
content=
"<neq name= '_keywords' value=''>{$_keywords}<else />{$site.site_header_keywords}</neq>"
name=
"keywords"
>
<meta
content=
"<neq name= '_keywords' value=''>{$_keywords}<else />{$site.site_header_keywords}</neq>"
<meta
content=
"<neq name= '_description' value=''>{$_description}<else />{$site.site_header_description}</neq>"
name=
"description"
>
name=
"keywords"
>
<meta
content=
"<neq name= '_description' value=''>{$_description}<else />{$site.site_header_description}</neq>"
name=
"description"
>
<meta
name=
"viewport"
charset=
"UTF-8"
content=
"user-scalable=no"
>
<meta
name=
"viewport"
charset=
"UTF-8"
content=
"user-scalable=no"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
property=
"qc:admins"
content=
"1403267155765154541656375"
/>
<meta
property=
"qc:admins"
content=
"1403267155765154541656375"
/>
<meta
property=
"wb:webmaster"
content=
"fdcd9430a88b1552"
/>
<meta
property=
"wb:webmaster"
content=
"fdcd9430a88b1552"
/>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
<meta
http-equiv=
"Access-Control-Allow-Origin"
content=
"*"
>
<meta
http-equiv=
"Access-Control-Allow-Origin"
content=
"*"
>
<meta
name=
"viewport"
content=
"target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"
>
<meta
name=
"viewport"
content=
"target-densitydpi=device-dpi, width=device-width, initial-scale=1, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, user-scalable=no"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, user-scalable=no"
>
<meta
name=
"x5-fullscreen"
content=
"true"
>
<meta
name=
"x5-fullscreen"
content=
"true"
>
<meta
name=
"full-screen"
content=
"yes"
>
<meta
name=
"full-screen"
content=
"yes"
>
<link
href=
"__THEME__/image/favicon.ico?v={$site.sys_version}"
type=
"image/x-icon"
rel=
"shortcut icon"
>
<link
href=
"__THEME__/image/favicon.ico?v={$site.sys_version}"
type=
"image/x-icon"
rel=
"shortcut icon"
>
<!-- 引入 Bootstrap -->
<!-- 引入 Bootstrap -->
<!-- <link rel="stylesheet" type="text/css" href="__THEME__/icon/iconfont.css">
<!-- <link rel="stylesheet" type="text/css" href="__THEME__/icon/iconfont.css">
<link rel="stylesheet" type="text/css" href="__APP__/css/search_3g.css">
<link rel="stylesheet" type="text/css" href="__APP__/css/search_3g.css">
<style>
<style>
@font-face {font-family: 'iconfontNEW';src: url('__THEME__/icon/iconfontNEW.woff?v={$site.sys_version}');}
@font-face {font-family: 'iconfontNEW';src: url('__THEME__/icon/iconfontNEW.woff?v={$site.sys_version}');}
...
@@ -30,7 +38,7 @@
...
@@ -30,7 +38,7 @@
<script
src=
"__THEMEW3G__/js/jquery-1.8.3.min.js"
></script>
<script
src=
"__THEMEW3G__/js/jquery-1.8.3.min.js"
></script>
<link
href=
"__THEMEW3G__/css/common.css"
rel=
"stylesheet"
>
<link
href=
"__THEMEW3G__/css/common.css"
rel=
"stylesheet"
>
<link
rel=
"stylesheet"
href=
"https://cdn.jsdelivr.net/npm/vant@2.6/lib/index.css"
/>
<link
rel=
"stylesheet"
href=
"https://cdn.jsdelivr.net/npm/vant@2.6/lib/index.css"
/>
<script
src=
"https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/vue/dist/vue.min.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/vant@2.6/lib/vant.min.js"
></script>
<script
src=
"https://cdn.jsdelivr.net/npm/vant@2.6/lib/vant.min.js"
></script>
<script
src=
"__THEMEW3G__/js/extension.js"
charset=
"utf-8"
></script>
<script
src=
"__THEMEW3G__/js/extension.js"
charset=
"utf-8"
></script>
...
@@ -83,9 +91,9 @@
...
@@ -83,9 +91,9 @@
// });
// });
// });
// });
</script>
</script>
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<div
id=
"app"
>
<div
class=
"layout_v"
>
<div
class=
"layout_v"
>
...
@@ -104,7 +112,8 @@
...
@@ -104,7 +112,8 @@
</van-search>
</van-search>
<div
v-if=
"!showHistory"
class=
"tabs_container"
style=
"margin-top: 0.5rem;"
>
<div
v-if=
"!showHistory"
class=
"tabs_container"
style=
"margin-top: 0.5rem;"
>
<div
@
click=
"onTab(idx)"
v-for=
"(opt, idx) in options"
:key=
"idx"
:class=
"idx == tab ? 'tab_item_selected' : 'tab_item_normal'"
>
<div
@
click=
"onTab(idx)"
v-for=
"(opt, idx) in options"
:key=
"idx"
:class=
"idx == tab ? 'tab_item_selected' : 'tab_item_normal'"
>
<span>
{{opt.title}}
</span>
<span>
{{opt.title}}
</span>
</div>
</div>
</div>
</div>
...
@@ -112,7 +121,8 @@
...
@@ -112,7 +121,8 @@
</van-sticky>
</van-sticky>
<template
v-if=
"showList(0)"
>
<template
v-if=
"showList(0)"
>
<div
@
click=
"onTapCourse(item)"
v-for=
"(item, idx) in options[0].items"
:key=
"idx"
class=
"home_class_item layout_v"
>
<div
@
click=
"onTapCourse(item)"
v-for=
"(item, idx) in options[0].items"
:key=
"idx"
class=
"home_class_item layout_v"
>
<div
class=
"layout_h"
>
<div
class=
"layout_h"
>
<van-image
<van-image
style=
"margin-right: 0.75rem;"
style=
"margin-right: 0.75rem;"
...
@@ -128,32 +138,37 @@
...
@@ -128,32 +138,37 @@
</div>
</div>
</div>
</div>
</div>
</div>
<span
style=
"margin-top: 35vh;"
v-if=
"options[0].items.length == 0"
class=
"text_14_400 color_999999 self_center"
>
没有找到!
</span>
<span
style=
"margin-top: 35vh;"
v-if=
"options[0].items.length == 0"
class=
"text_14_400 color_999999 self_center"
>
没有找到!
</span>
</template>
</template>
<template
v-if=
"showList(1)"
>
<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) in options[1].items"
:key=
"idx"
class=
"layout_v home_question_item"
>
<div
v-if=
"item.price == 0"
class=
"layout_h"
>
<div
v-if=
"item.price == 0"
class=
"layout_h"
>
<div
class=
"home_item_mark_green layout_center"
>
免费
</div>
<div
class=
"home_item_mark_green layout_center"
>
免费
</div>
<span
class=
"text_14_600 color_333333 weight_full van-multi-ellipsis--l2"
style=
"margin-right: 1.5rem;margin-left: 0.625rem;"
>
{{item.title}}
</span>
<span
class=
"text_14_600 color_333333 weight_full van-multi-ellipsis--l2"
style=
"margin-right: 1.5rem;margin-left: 0.625rem;"
>
{{item.title}}
</span>
<div
@
click=
"onTapQuestion(item)"
class=
"home_button_green layout_center"
>
开始做题
</div>
<div
@
click=
"onTapQuestion(item)"
class=
"home_button_green layout_center"
>
开始做题
</div>
</div>
</div>
<div
v-else
class=
"layout_h"
>
<div
v-else
class=
"layout_h"
>
<div
class=
"home_item_mark_orange layout_center"
>
付费
</div>
<div
class=
"home_item_mark_orange layout_center"
>
付费
</div>
<span
class=
"text_14_600 color_333333 weight_full van-multi-ellipsis--l2"
style=
"margin-right: 1.5rem;margin-left: 0.625rem;"
>
{{item.title}}
</span>
<span
class=
"text_14_600 color_333333 weight_full van-multi-ellipsis--l2"
style=
"margin-right: 1.5rem;margin-left: 0.625rem;"
>
{{item.title}}
</span>
<div
@
click=
"onTapQuestion(item)"
class=
"home_button_orange layout_center"
>
¥{{item.price}}
</div>
<div
@
click=
"onTapQuestion(item)"
class=
"home_button_orange layout_center"
>
¥{{item.price}}
</div>
</div>
</div>
<div
class=
"layout_h_b"
style=
"margin-top: 0.5rem;"
>
<div
class=
"layout_h_b"
style=
"margin-top: 0.5rem;"
>
<span
class=
"text_14_600 color_FF3B3B"
>
¥{{item.price}}
</span>
<span
class=
"text_14_600 color_FF3B3B"
>
¥{{item.price}}
</span>
<van-image
src=
"__THEME__/img/down_load_icon.png"
width=
"13"
height=
"16"
></van-image>
<van-image
src=
"__THEME__/img/down_load_icon.png"
width=
"13"
height=
"16"
></van-image>
</div>
</div>
<div
class=
"home_divider divider"
></div>
<div
class=
"home_divider divider"
></div>
</div>
</div>
<span
style=
"margin-top: 35vh;"
v-if=
"options[1].items.length == 0"
class=
"text_14_400 color_999999 self_center"
>
没有找到!
</span>
<span
style=
"margin-top: 35vh;"
v-if=
"options[1].items.length == 0"
class=
"text_14_400 color_999999 self_center"
>
没有找到!
</span>
</template>
</template>
<template
v-if=
"showList(2)"
>
<template
v-if=
"showList(2)"
>
<div
@
click=
"onTapGoods(item)"
v-for=
"(item, idx) in options[2].items"
:key=
"idx"
class=
"home_item_goods layout_h"
>
<div
@
click=
"onTapGoods(item)"
v-for=
"(item, idx) in options[2].items"
:key=
"idx"
class=
"home_item_goods layout_h"
>
<van-image
<van-image
style=
"margin-right: 0.75rem;"
style=
"margin-right: 0.75rem;"
height=
"68"
height=
"68"
...
@@ -169,7 +184,8 @@
...
@@ -169,7 +184,8 @@
</div>
</div>
</div>
</div>
</div>
</div>
<span
style=
"margin-top: 35vh;"
v-if=
"options[2].items.length == 0"
class=
"text_14_400 color_999999 self_center"
>
没有找到!
</span>
<span
style=
"margin-top: 35vh;"
v-if=
"options[2].items.length == 0"
class=
"text_14_400 color_999999 self_center"
>
没有找到!
</span>
</template>
</template>
<!-- 热门搜索 -->
<!-- 热门搜索 -->
...
@@ -184,8 +200,8 @@
...
@@ -184,8 +200,8 @@
</div>
</div>
</div>
</div>
<!-- <div class="search-bodyer">
<!-- <div class="search-bodyer">
<div class="goods-eac-box">
<div class="goods-eac-box">
<div class="eac-per-ens">
<div class="eac-per-ens">
<div class="aingstoit">
<div class="aingstoit">
...
@@ -258,12 +274,12 @@
...
@@ -258,12 +274,12 @@
</volist>
</volist>
</ul>
</ul>
</div>
</div>
</div> -->
</div> -->
</body>
</body>
<script
type=
"text/javascript"
>
<script
type=
"text/javascript"
>
new
Vue
({
new
Vue
({
el
:
'#app'
,
el
:
'#app'
,
data
:
function
()
{
data
:
function
()
{
return
{
return
{
keyword
:
""
,
keyword
:
""
,
showHistory
:
true
,
showHistory
:
true
,
...
@@ -271,55 +287,56 @@
...
@@ -271,55 +287,56 @@
options
:
[{
options
:
[{
title
:
'视频'
,
title
:
'视频'
,
items
:
[]
items
:
[]
},
{
},
{
title
:
'真题'
,
title
:
'真题'
,
items
:
[]
items
:
[]
},
{
},
{
title
:
'实物'
,
title
:
'实物'
,
items
:
[]
items
:
[]
}]
}],
cacheKeyWorlds
:
this
.
getCacheKeyWorlds
()
}
}
},
},
computed
:
{
computed
:
{
showList
:
function
()
{
showList
:
function
()
{
let
tab
=
this
.
tab
let
tab
=
this
.
tab
let
showHot
=
this
.
showHistory
let
showHot
=
this
.
showHistory
return
function
(
idx
)
{
return
function
(
idx
)
{
return
(
idx
==
tab
)
&&
!
showHot
return
(
idx
==
tab
)
&&
!
showHot
}
}
}
},
},
cacheKeyWorlds
:
function
()
{
methods
:
{
getCacheKeyWorlds
:
function
()
{
let
item
=
localStorage
.
getItem
(
"search"
);
let
item
=
localStorage
.
getItem
(
"search"
);
//['考研课程', '事业单位考试', '公务员考试'];
//['考研课程', '事业单位考试', '公务员考试'];
return
item
?
JSON
.
parse
(
item
)
:
[];
return
item
?
JSON
.
parse
(
item
)
:
[];
}
},
},
methods
:
{
onFocus
:
function
()
{
onFocus
:
function
()
{
this
.
showHistory
=
true
this
.
showHistory
=
true
},
},
onHotKeyword
:
function
(
key
)
{
onHotKeyword
:
function
(
key
)
{
this
.
keyword
=
key
this
.
keyword
=
key
this
.
onSearch
()
this
.
onSearch
()
},
},
onSearch
:
function
()
{
onSearch
:
function
()
{
this
.
showHistory
=
false
this
.
showHistory
=
false
this
.
searchCourse
()
this
.
searchCourse
()
this
.
searchQuestion
()
this
.
searchQuestion
()
this
.
searchGoods
()
this
.
searchGoods
()
this
.
searchSave
()
this
.
searchSave
()
},
},
onTab
:
function
(
idx
)
{
onTab
:
function
(
idx
)
{
this
.
tab
=
idx
this
.
tab
=
idx
},
},
//点击视频
//点击视频
onTapCourse
:
function
(
item
)
{
onTapCourse
:
function
(
item
)
{
let
url
=
"{:U('course/Video/view')}"
let
url
=
"{:U('course/Video/view')}"
window
.
location
.
href
=
url
.
replace
(
/
\[
.*
?\]
/g
,
item
.
id
)
window
.
location
.
href
=
url
.
replace
(
/
\[
.*
?\]
/g
,
item
.
id
)
},
},
//点击真题
//点击真题
onTapQuestion
:
function
(
item
)
{
onTapQuestion
:
function
(
item
)
{
if
(
MID
<=
0
)
{
if
(
MID
<=
0
)
{
ui
.
confirm
(
'请先登录'
,
{
ui
.
confirm
(
'请先登录'
,
{
yes
:
function
()
{
yes
:
function
()
{
window
.
location
.
href
=
"{:U('basic/Passport/login')}"
;
window
.
location
.
href
=
"{:U('basic/Passport/login')}"
;
...
@@ -327,22 +344,22 @@
...
@@ -327,22 +344,22 @@
})
})
return
return
}
}
if
(
item
.
price
==
0
)
{
if
(
item
.
price
==
0
)
{
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
}
else
{
}
else
{
$
.
ajax
({
$
.
ajax
({
type
:
"POST"
,
type
:
"POST"
,
url
:
"{:U('exams/index/getPayUrl')}"
,
url
:
"{:U('exams/index/getPayUrl')}"
,
data
:
{
data
:
{
paper_id
:
item
.
id
,
paper_id
:
item
.
id
,
},
},
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
var
res
=
getResponseData
(
res
)
var
res
=
getResponseData
(
res
)
if
(
res
.
status
==
1
)
{
if
(
res
.
status
==
1
)
{
window
.
location
.
href
=
res
.
data
window
.
location
.
href
=
res
.
data
}
else
{
}
else
{
ui
.
error
(
res
.
message
)
ui
.
error
(
res
.
message
)
}
}
}
}
...
@@ -350,21 +367,21 @@
...
@@ -350,21 +367,21 @@
}
}
},
},
//点击实物
//点击实物
onTapGoods
:
function
(
item
)
{
onTapGoods
:
function
(
item
)
{
let
url
=
"{:U('mall/Goods/view')}"
let
url
=
"{:U('mall/Goods/view')}"
window
.
location
.
href
=
url
.
replace
(
/
\[
.*
?\]
/g
,
item
.
id
)
window
.
location
.
href
=
url
.
replace
(
/
\[
.*
?\]
/g
,
item
.
id
)
},
},
//搜索课程
//搜索课程
searchCourse
:
function
()
{
searchCourse
:
function
()
{
let
that
=
this
let
that
=
this
let
on
=
"{$marketConf['order_switch']}"
==
1
let
on
=
"{$marketConf['order_switch']}"
==
1
$
.
ajax
({
$
.
ajax
({
type
:
"GET"
,
type
:
"GET"
,
url
:
"{:U('course/Video/index')}"
+
"?api=1&search="
+
that
.
keyword
,
url
:
"{:U('course/Video/index')}"
+
"?api=1&search="
+
that
.
keyword
,
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
let
array
=
res
.
data
.
length
>
0
?
res
.
data
:
[]
let
array
=
res
.
data
.
length
>
0
?
res
.
data
:
[]
that
.
options
[
0
].
items
=
array
.
map
(
r
=>
{
that
.
options
[
0
].
items
=
array
.
map
(
r
=>
{
let
pi
=
r
.
mz_price
let
pi
=
r
.
mz_price
return
{
return
{
id
:
r
.
id
,
id
:
r
.
id
,
...
@@ -378,17 +395,17 @@
...
@@ -378,17 +395,17 @@
})
})
},
},
//搜索题目
//搜索题目
searchQuestion
:
function
()
{
searchQuestion
:
function
()
{
let
that
=
this
let
that
=
this
$
.
ajax
({
$
.
ajax
({
type
:
"GET"
,
type
:
"GET"
,
url
:
"{:U('exams/Index/paper')}"
+
"&api=1&search="
+
that
.
keyword
,
url
:
"{:U('exams/Index/paper')}"
+
"&api=1&search="
+
that
.
keyword
,
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
if
(
res
.
status
==
1
)
{
if
(
res
.
status
==
1
)
{
let
result
=
res
.
data
let
result
=
res
.
data
let
array
=
result
.
data
.
length
>
0
?
result
.
data
:
[]
let
array
=
result
.
data
.
length
>
0
?
result
.
data
:
[]
that
.
options
[
1
].
items
=
array
.
map
(
r
=>
{
that
.
options
[
1
].
items
=
array
.
map
(
r
=>
{
return
{
return
{
id
:
r
.
exams_paper_id
,
id
:
r
.
exams_paper_id
,
title
:
r
.
exams_paper_title
,
title
:
r
.
exams_paper_title
,
...
@@ -400,15 +417,15 @@
...
@@ -400,15 +417,15 @@
})
})
},
},
//搜索物品
//搜索物品
searchGoods
:
function
()
{
searchGoods
:
function
()
{
let
that
=
this
let
that
=
this
$
.
ajax
({
$
.
ajax
({
type
:
"GET"
,
type
:
"GET"
,
url
:
"{:U('mall/Goods/index')}"
+
"?api=1&search="
+
that
.
keyword
,
url
:
"{:U('mall/Goods/index')}"
+
"?api=1&search="
+
that
.
keyword
,
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
res
)
{
success
:
function
(
res
)
{
let
array
=
res
.
data
.
length
>
0
?
res
.
data
:
[]
let
array
=
res
.
data
.
length
>
0
?
res
.
data
:
[]
that
.
options
[
2
].
items
=
array
.
map
(
r
=>
{
that
.
options
[
2
].
items
=
array
.
map
(
r
=>
{
return
{
return
{
id
:
r
.
uid
,
id
:
r
.
uid
,
title
:
r
.
title
,
title
:
r
.
title
,
...
@@ -434,5 +451,5 @@
...
@@ -434,5 +451,5 @@
}
}
}
}
})
})
</script>
</script>
</html>
</html>
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