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
e47082b5
Commit
e47082b5
authored
May 18, 2020
by
陈超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
T
parent
58357ecf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
17 deletions
+22
-17
apps/classroom/Tpl/default/Index/search_w3g.html
+22
-17
No files found.
apps/classroom/Tpl/default/Index/search_w3g.html
View file @
e47082b5
...
@@ -143,7 +143,12 @@
...
@@ -143,7 +143,12 @@
<template
v-if=
"showList(1)"
>
<template
v-if=
"showList(1)"
>
<div
@
click=
"onTapQuestion(item)"
v-for=
"(item, idx) in options[1].items"
:key=
"idx"
class=
"layout_v home_question_item"
>
<div
@
click=
"onTapQuestion(item)"
v-for=
"(item, idx) in options[1].items"
:key=
"idx"
class=
"layout_v home_question_item"
>
<div
class=
"layout_h"
>
<div
v-if=
"item.price == 0"
class=
"layout_h"
>
<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>
<div
class=
"home_button_green layout_center"
>
开始做题
</div>
</div>
<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
class=
"home_button_orange layout_center"
>
¥{{item.price}}
</div>
<div
class=
"home_button_orange layout_center"
>
¥{{item.price}}
</div>
...
@@ -348,22 +353,22 @@
...
@@ -348,22 +353,22 @@
})
})
},
},
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
)
{
//
let array = res.data.length > 0 ? res.data : []
let
array
=
res
.
data
.
length
>
0
?
res
.
data
:
[]
// that.options[1]
= 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
,
//
price: r.price
price
:
r
.
price
//
}
}
//
})
})
//
}
}
//
})
})
},
},
searchGoods
:
function
()
{
searchGoods
:
function
()
{
let
that
=
this
let
that
=
this
...
...
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