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
341e3600
Commit
341e3600
authored
May 14, 2020
by
陈超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
T
parent
c1691136
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
10 deletions
+39
-10
apps/mall/Tpl/default/Goods/index_w3g.html
+39
-10
No files found.
apps/mall/Tpl/default/Goods/index_w3g.html
View file @
341e3600
...
@@ -48,22 +48,22 @@
...
@@ -48,22 +48,22 @@
</a>
</a>
</li> -->
</li> -->
<
a
href=
"{:U('mall/Goods/view',array('id'=>$vo['goods_id']))}"
v-for=
"(item, idx) in options[2].items"
:key=
"idx"
class=
"home_item_goods layout_h"
>
<
div
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"
width=
"128"
width=
"128"
fit=
"cover"
fit=
"cover"
src=
"{:getCover($vo['cover_ids'],360,360)}
"
>
:src=
"item.cover
"
>
</van-image>
</van-image>
<div
class=
"weight_full layout_v"
>
<div
class=
"weight_full layout_v"
>
<span
class=
"text_14_600 color_333333 van-multi-ellipsis--l2"
>
{
$vo.title
}
</span>
<span
class=
"text_14_600 color_333333 van-multi-ellipsis--l2"
>
{
{item.title}
}
</span>
<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 self_center"
>
¥{
$vo.price
}
</span>
<span
class=
"text_14_600 color_FF3B3B self_center"
>
¥{
{item.price}
}
</span>
<div
class=
"item_green_button"
>
购买
</div>
<div
class=
"item_green_button"
>
购买
</div>
</div>
</div>
</div>
</div>
</
a
>
</
div
>
</volist>
</volist>
</template>
</template>
...
@@ -168,15 +168,18 @@
...
@@ -168,15 +168,18 @@
options
:
[{
options
:
[{
title
:
'视频'
,
title
:
'视频'
,
items
:
[
1
,
2
],
items
:
[
1
,
2
],
page
:
1
,
page
:
0
,
finished
:
false
},{
},{
title
:
'真题'
,
title
:
'真题'
,
items
:
[
1
,
2
],
items
:
[
1
,
2
],
page
:
1
,
page
:
0
,
finished
:
false
},{
},{
title
:
'实物'
,
title
:
'实物'
,
items
:
[
1
,
2
],
items
:
[
1
,
2
],
page
:
1
,
page
:
0
,
finished
:
false
}]
}]
}
}
},
},
...
@@ -189,20 +192,46 @@
...
@@ -189,20 +192,46 @@
methods
:
{
methods
:
{
onTab
:
function
(
idx
)
{
onTab
:
function
(
idx
)
{
this
.
tab
=
idx
this
.
tab
=
idx
let
opt
=
this
.
options
[
idx
]
if
(
opt
.
finished
)
{
this
.
loading
=
false
this
.
finished
=
true
}
else
{
this
.
loading
=
true
this
.
finished
=
false
this
.
onLoad
()
}
},
},
onLoad
:
function
()
{
onLoad
:
function
()
{
let
that
=
this
let
opt
=
that
.
options
[
that
.
tab
]
if
(
that
.
tab
==
2
)
{
$
.
ajax
({
$
.
ajax
({
type
:
"GET"
,
type
:
"GET"
,
url
:
"{:U('mall/Goods/index')}"
,
url
:
"{:U('mall/Goods/index')}"
,
data
:
"api=1&p="
+
1
+
data
:
"api=1&p="
+
(
opt
.
page
+
1
)
+
"&sort_type={$_GET['sort_type']}&cateId={$_GET['cateId']}"
,
"&sort_type={$_GET['sort_type']}&cateId={$_GET['cateId']}"
,
dataType
:
"json"
,
dataType
:
"json"
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
console
.
log
(
data
)
that
.
loading
=
false
let
res
=
JSON
.
stringify
(
data
)
let
opt
=
that
.
options
[
2
]
if
(
res
.
status
)
{
opt
.
items
.
push
(
res
.
data
.
map
(
r
=>
{
return
{
uid
:
r
.
uid
,
title
:
r
.
title
,
cover
:
r
.
cover
,
price
:
r
.
price
}}))
opt
.
page
=
res
.
nowPage
opt
.
finished
=
res
.
nowPage
==
res
.
totalPages
that
.
finished
=
res
.
nowPage
==
res
.
totalPages
}
}
}
})
})
}
}
}
}
}
})
})
/*确定点击*/
/*确定点击*/
...
...
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