File tree Expand file tree Collapse file tree 10 files changed +32
-22
lines changed Expand file tree Collapse file tree 10 files changed +32
-22
lines changed Original file line number Diff line number Diff line change @@ -55,26 +55,30 @@ const ChapterDetailed = (props) => {
55
55
< div className = 'pager' >
56
56
{
57
57
chapter . preId &&
58
- < Link href = { `/chapterdetail?id=${ chapter . preId } ` } >
59
- < a className = 'item' >
60
- < span className = 'item-text' > 上一章</ span >
61
- </ a >
62
- </ Link >
58
+ < div className = 'item' >
59
+ < Link href = { `/chapterdetail?id=${ chapter . preId } ` } >
60
+ < a >
61
+ < span className = 'item-text' > 上一章</ span >
62
+ </ a >
63
+ </ Link >
64
+ </ div >
63
65
}
64
66
< div className = 'item' >
65
67
< Link href = { `/noveldetail?id=${ chapter . novelId } ` } >
66
- < a className = 'item' >
67
- < span className = 'item-text' > 目录</ span >
68
+ < a >
69
+ < span className = 'item-text ' > 目录</ span >
68
70
</ a >
69
71
</ Link >
70
72
</ div >
71
73
{
72
74
chapter . nextId &&
73
- < Link href = { `/chapterdetail?id=${ chapter . nextId } ` } >
74
- < a className = 'item' >
75
- < span className = 'item-text' > 下一章</ span >
76
- </ a >
77
- </ Link >
75
+ < div className = 'item' >
76
+ < Link href = { `/chapterdetail?id=${ chapter . nextId } ` } >
77
+ < a >
78
+ < span className = 'item-text' > 下一章</ span >
79
+ </ a >
80
+ </ Link >
81
+ </ div >
78
82
}
79
83
</ div >
80
84
< div className = "comment-wrapper" >
Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ const myMenu = (props) => {
9
9
const navs = props . navs
10
10
const router = props . router
11
11
const [ currentNav , setCurrentNav ] = useState ( navs [ 0 ] ? navs [ 0 ] . type : '' )
12
- console . log ( navs )
13
12
// 通过Link导航(便于seo),每次进入的时候都会重新render组件,所以可以在生命周期中实现
14
13
useEffect ( ( ) => {
15
14
for ( const nav of navs ) {
Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ const NovelItem = (props)=>{
49
49
< div className = "introduce" dangerouslySetInnerHTML = { { __html : marked ( novel . summary ) } } > </ div >
50
50
< div className = "view-content" >
51
51
< Link href = { `/chapterdetail?id=${ novel . id } ` } >
52
- < a > 查看全文 > </ a >
52
+ < a > 查看全文 > </ a >
53
53
</ Link >
54
54
</ div >
55
55
</ div >
Original file line number Diff line number Diff line change 1
1
const vuebaseUrl = 'https://vue.immortalboy.cn'
2
2
const serverUrl = 'https://immortalboy.cn'
3
3
const imgServerUrl = 'https://iamge.immortalboy.cn'
4
- const baseUrl = 'https://immortalboy.cn/api/blog'
4
+ // const baseUrl = 'https://immortalboy.cn/api/blog'
5
+ const baseUrl = 'http://localhost:7001/api/blog'
5
6
6
7
const servicePath = {
7
8
visitorLogin : baseUrl + '/comment/visitorLogin' , // 评论接口:获取文章列表
Original file line number Diff line number Diff line change 55
55
.article-detailed .pager .item .item-text {
56
56
padding : .5rem 1rem ;
57
57
font-size : 1.2rem ;
58
-
58
+ color : # 333333 ;
59
59
}
60
60
61
61
.article-detailed .comment-wrapper .divider {
Original file line number Diff line number Diff line change 9
9
display : flex;
10
10
}
11
11
.novel-detailed .novel-info .info-left {
12
- padding : 0 1rem ;
12
+ padding : 1rem ;
13
13
}
14
14
.novel-detailed .novel-info .info-left .img {
15
15
height : 10rem ;
46
46
font-size : 13px ;
47
47
}
48
48
.novel-detailed .novel-info .info-right .info-second {
49
- padding : 1rem 0 ;
49
+ margin-top : 1rem ;
50
+ padding : .5rem ;
51
+ border-radius : .25rem ;
52
+ background-color : # f9f9f9 ;
53
+ display : block;
54
+ text-align : left;
55
+ text-indent : 2rem ;
50
56
}
51
57
.novel-detailed .chapter-list {
52
58
background-color : # fff ;
Original file line number Diff line number Diff line change @@ -354,7 +354,6 @@ export default {
354
354
}
355
355
},
356
356
clickInput (e ) {
357
- console .log (this .hasLogin )
358
357
if (! this .hasLogin ) {
359
358
this .showLoginDialog = true
360
359
// e.preventDefault()
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ class IndexController extends controller {
195
195
chapter.view_count AS viewCount, chapter.updatetime AS publishTime
196
196
FROM novel_chapter AS chapter
197
197
LEFT JOIN novel ON chapter.novel_id = novel.id
198
- WHERE chapter.id in(${ chapterIdStr } ) ORDER BY updatetime DESC` ;
198
+ WHERE chapter.id in(${ chapterIdStr } ) ORDER BY chapter.createtime DESC` ;
199
199
chapterListResult = await this . app . mysql . query ( chapterListSql ) ;
200
200
}
201
201
this . ctx . body = {
Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ class ChapterController extends controller {
65
65
const sqlResult = await this . app . mysql . query ( sql , [ id ] ) ;
66
66
if ( sqlResult . length > 0 ) {
67
67
const result = sqlResult [ 0 ] ;
68
- const nextSql = `SELECT id, createtime FROM novel_chapter WHERE createtime
68
+ const nextSql = `SELECT id, createtime AS createTime FROM novel_chapter WHERE createtime
69
69
in((SELECT max(createtime) FROM novel_chapter WHERE createtime< ?),
70
70
(SELECT min(createtime) FROM novel_chapter WHERE createtime> ?))` ;
71
71
const nextResult = await this . app . mysql . query ( nextSql , [ result . createTime , result . createTime ] ) ;
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ module.exports = appInfo => {
27
27
// database configuration
28
28
client : {
29
29
// host
30
- host : 'localhost' ,
30
+ host : '129.211.106.174' ,
31
+ // host: 'localhost',
31
32
// port
32
33
port : '3306' ,
33
34
// username
You can’t perform that action at this time.
0 commit comments