Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
beyond-clouds-front
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
Administrator
beyond-clouds-front
Commits
32fc7f3f
Commit
32fc7f3f
authored
Feb 23, 2020
by
yanju
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'new-func#1' into 'master'
主页服务端渲染 See merge request pigbigbig/beyond-clouds-front!116
parents
ccff5390
c43e9007
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
60 deletions
+23
-60
pages/index.vue
+23
-27
pages/test.vue
+0
-33
No files found.
pages/index.vue
View file @
32fc7f3f
...
...
@@ -60,7 +60,27 @@
}
});
return
{
blogList
:
blogList
.
data
.
dataList
,
projectList
:
projectList
.
data
.
dataList
}
let
newsList
=
await
$axios
.
$get
(
config
.
api
.
get
.
Content
.
list
+
'/13/contents'
,
{
params
:
{
page
:
1
,
size
:
5
,
type
:
1
}
})
let
bannerList
=
await
$axios
.
$get
(
config
.
api
.
get
.
Content
.
list
+
'/12/contents'
,
{
params
:
{
page
:
1
,
size
:
5
,
type
:
0
}
})
return
{
blogList
:
blogList
.
data
.
dataList
,
projectList
:
projectList
.
data
.
dataList
,
bannerList
:
bannerList
.
data
.
dataList
,
newsList
:
newsList
.
data
.
dataList
}
},
data
(){
return
{
...
...
@@ -75,7 +95,6 @@
created
()
{
this
.
dataGetHotBloggersList
();
this
.
dataGetHotAnswerList
();
this
.
dataGetNewsList
();
this
.
dataGetBanner
();
},
...
...
@@ -98,17 +117,7 @@
},
dataGetBanner
(){
//内容类型-0:幻灯,1:普通文章,3:广告
let
params
=
{
page
:
1
,
size
:
5
,
type
:
0
};
this
.
$axios
.
$get
(
config
.
api
.
get
.
Content
.
list
+
'/12/contents'
,
{
params
:
params
}).
then
((
response
)
=>
{
let
dataList
=
response
.
data
.
dataList
;
let
dataList
=
this
.
bannerList
;
dataList
.
map
((
val
,
index
)
=>
{
this
.
imgArr
.
push
(
val
.
pic1
...
...
@@ -117,7 +126,7 @@
val
.
link
)
})
})
},
dataGetHotBloggersList
()
{
...
...
@@ -142,19 +151,6 @@
});
},
dataGetNewsList
()
{
let
params
=
{
page
:
1
,
size
:
5
,
type
:
1
};
this
.
$axios
.
$get
(
config
.
api
.
get
.
Content
.
list
+
'/13/contents'
,
{
params
:
params
}).
then
((
response
)
=>
{
this
.
newsList
=
response
.
data
.
dataList
;
})
},
},
mounted
(){
}
...
...
pages/test.vue
View file @
32fc7f3f
<
template
>
<yun-video></yun-video>
</
template
>
<
script
>
import
YunVideo
from
'../components/common/video/src/main.vue'
;
export
default
{
components
:{
YunVideo
},
data
(){
return
{
}
},
props
:{
},
}
</
script
>
<
style
lang=
"scss"
scoped
>
.container
{
width
:
$
pageWidth
;
margin
:
0
auto
;
}
</
style
>
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