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
c8c08bda
Commit
c8c08bda
authored
Feb 17, 2020
by
yanju
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
博客发布页添加心跳
parent
9c52c6d7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
action/config.js
+1
-0
pages/blog/release/index.vue
+17
-0
No files found.
action/config.js
View file @
c8c08bda
...
@@ -54,6 +54,7 @@ export default {
...
@@ -54,6 +54,7 @@ export default {
active
:
'/api/user/actives'
,
//活跃用户
active
:
'/api/user/actives'
,
//活跃用户
repliers
:
'/api/user/hotRepliers'
,
//热门答主
repliers
:
'/api/user/hotRepliers'
,
//热门答主
logout
:
'/api/user/logout'
,
//注销登录
logout
:
'/api/user/logout'
,
//注销登录
keepAlive
:
'/api/user/keepAlive'
,
//心跳接口
},
},
...
...
pages/blog/release/index.vue
View file @
c8c08bda
...
@@ -169,6 +169,15 @@ export default {
...
@@ -169,6 +169,15 @@ export default {
};
};
}
}
},
},
created
(){
this
.
keepAlive
()
},
destroyed
()
{
this
.
keepAliveTimer
=
null
;
},
mounted
()
{
mounted
()
{
if
(
this
.
$route
.
query
.
id
)
{
if
(
this
.
$route
.
query
.
id
)
{
this
.
blogTitle
=
this
.
detailContent
.
blogTitle
;
this
.
blogTitle
=
this
.
detailContent
.
blogTitle
;
...
@@ -198,6 +207,7 @@ export default {
...
@@ -198,6 +207,7 @@ export default {
components
:
{
SelectCard
,
CardContainer
},
components
:
{
SelectCard
,
CardContainer
},
data
()
{
data
()
{
return
{
return
{
keepAliveTimer
:
null
,
markdownOption
:
{
markdownOption
:
{
bold
:
true
,
// 粗体
bold
:
true
,
// 粗体
italic
:
true
,
// 斜体
italic
:
true
,
// 斜体
...
@@ -250,6 +260,13 @@ export default {
...
@@ -250,6 +260,13 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
keepAlive
(){
this
.
keepAliveTimer
=
setInterval
(()
=>
{
this
.
$axios
.
$get
(
config
.
api
.
get
.
User
.
keepAlive
).
then
((
response
)
=>
{
})
},
10000
)
},
preview
()
{
preview
()
{
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
// this.$refs.content.readmodel();
// this.$refs.content.readmodel();
...
...
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