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
e5cc37fa
Commit
e5cc37fa
authored
May 20, 2020
by
陈超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A
parent
d3d2511e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
apps/news/Tpl/default/Topic/index_w3g.html
+19
-4
No files found.
apps/news/Tpl/default/Topic/index_w3g.html
View file @
e5cc37fa
...
@@ -40,7 +40,20 @@
...
@@ -40,7 +40,20 @@
</template>
</template>
<template
v-if=
"tab == 1"
>
<template
v-if=
"tab == 1"
>
<div
v-for=
"(item, index) in options[1].items"
class=
"layout_h news_hire_info"
>
<van-image
height=
"72"
width=
"72"
:src=
"item.cover"
fit=
"cover"
></van-image>
<div
class=
"layout_v_b weight_full"
style=
"margin-left: 0.75rem;"
>
<div
class=
"text_14_600 color_333333"
>
{{item.title}}
</div>
<div
class=
"layout_h_b"
style=
"align-items: flex-end;"
>
<div
class=
"layout_h"
>
<span
class=
"text_12_400 color_999999"
style=
"margin-right: 0.75rem;"
>
{{item.time}}
</span>
</div>
<div
class=
"layout_h_r weight_full"
>
<div
@
click=
"onItem(item)"
class=
"news_see_button layout_center text_12_400 color_white"
>
查看
</div>
</div>
</div>
</div>
</div>
</template>
</template>
<template
v-if=
"tab == 2"
>
<template
v-if=
"tab == 2"
>
...
@@ -93,7 +106,10 @@
...
@@ -93,7 +106,10 @@
methods
:
{
methods
:
{
onChange
:
function
(
tab
)
{
onChange
:
function
(
tab
)
{
this
.
tab
=
tab
this
.
tab
=
tab
this
.
onLoad
()
let
opt
=
that
.
options
[
that
.
tab
]
if
(
opt
.
items
.
length
==
0
)
{
this
.
onLoad
()
}
},
},
onLoad
:
function
()
{
onLoad
:
function
()
{
let
that
=
this
let
that
=
this
...
@@ -108,13 +124,12 @@
...
@@ -108,13 +124,12 @@
let
array
=
data
.
data
.
length
>
0
?
data
.
data
:
[]
let
array
=
data
.
data
.
length
>
0
?
data
.
data
:
[]
if
(
array
.
length
>
0
)
{
if
(
array
.
length
>
0
)
{
opt
.
page
+=
1
opt
.
page
+=
1
console
.
log
(
array
)
opt
.
items
=
opt
.
items
.
concat
(
array
.
map
(
r
=>
{
opt
.
items
=
opt
.
items
.
concat
(
array
.
map
(
r
=>
{
let
d
=
new
Date
(
r
.
dateline
*
1000
)
let
d
=
new
Date
(
r
.
dateline
*
1000
)
console
.
log
(
d
)
return
{
return
{
id
:
r
.
id
,
id
:
r
.
id
,
title
:
r
.
title
,
title
:
r
.
title
,
cover
:
r
.
image
,
time
:
d
.
format
(
"yyyy-MM-dd"
)
time
:
d
.
format
(
"yyyy-MM-dd"
)
}
}
}))
}))
...
...
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