Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
W
web-site
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张冬
web-site
Commits
e3cbd55e
Commit
e3cbd55e
authored
Sep 22, 2020
by
吴冠
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
主页下侧
parent
0354d579
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
index.vue
pages/index/index.vue
+11
-9
No files found.
pages/index/index.vue
View file @
e3cbd55e
...
...
@@ -34,9 +34,9 @@
<div
class=
"more t1 list-con"
>
更多 >
</div>
</div>
<ul>
<li
v-for=
"(item,index) in dynamic
List
"
:key=
"index"
v-if=
"index
<5
"
class=
"flex-between list-con"
>
<li
v-for=
"(item,index) in dynamic"
:key=
"index"
v-if=
"index
<5
"
class=
"flex-between list-con"
>
<nuxt-link
tag=
"div"
to=
"#"
>
{{
item
.
title
}}
</nuxt-link>
<div
class=
"time"
>
{{
item
.
createTime
}}
</div>
<div
class=
"time"
>
{{
item
.
createTime
.
slice
(
0
,
10
)
}}
</div>
</li>
</ul>
</div>
...
...
@@ -61,6 +61,7 @@ import {getSecond,getCategoryList,getListSite} from '@/common/list.js'
this
.
getSecond
()
//文章列表
this
.
getCategoryList
()
this
.
getListSite
()
},
methods
:{
async
getCategoryList
(){
...
...
@@ -68,11 +69,13 @@ import {getSecond,getCategoryList,getListSite} from '@/common/list.js'
this
.
dynamicList
=
data
},
async
getListSite
(){
let
message
=
{}
message
.
cateId
=
this
.
id
/*
let message = {}
message.cateId = this.id
*/
const
{
data
}
=
await
getListSite
()
console
.
log
(
data
,
'++++++++++++++++++++++++'
)
/* this.dynamicList.list = data.list */
console
.
log
(
'-------------------'
)
this
.
dynamic
=
data
console
.
log
(
'--------------------'
)
},
//添加验证方法
async
getSecond
(){
...
...
@@ -80,8 +83,7 @@ import {getSecond,getCategoryList,getListSite} from '@/common/list.js'
if
(
tokenStr
){
this
.
showDefault
=
false
sessionStorage
.
setItem
(
"websiteenRequestTokenRequest"
,
10
)
const
{
data
,
code
}
=
await
getSecond
()
const
{
data
}
=
await
getSecond
()
window
.
sessionStorage
.
setItem
(
"companyName"
,
data
.
companyName
)
this
.
userName
=
window
.
sessionStorage
.
getItem
(
"companyName"
)
}
...
...
@@ -107,8 +109,8 @@ import {getSecond,getCategoryList,getListSite} from '@/common/list.js'
},
data
()
{
return
{
id
:
0
,
dynam
e
:[],
id
:
123
,
dynam
ic
:[],
showDefault
:
true
,
userName
:
'Hi~欢迎来到捷安彩'
,
userHeader
:
''
,
...
...
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