解决页面切换页面导致评论路由不对,没有评论数据
This commit is contained in:
parent
cc2317c2e4
commit
41614091a7
|
@ -6,7 +6,7 @@
|
||||||
el: '#artalk-wrap',
|
el: '#artalk-wrap',
|
||||||
server: GLOBAL_CONFIG.source.artalk.artalkUrl,
|
server: GLOBAL_CONFIG.source.artalk.artalkUrl,
|
||||||
site: GLOBAL_CONFIG.source.artalk.siteName,
|
site: GLOBAL_CONFIG.source.artalk.siteName,
|
||||||
pageKey: location.pathname,
|
pageKey: location.pathname.replace(/\/page\/\d$/, ""),
|
||||||
darkMode: false,
|
darkMode: false,
|
||||||
countEl: '#ArtalkCount'
|
countEl: '#ArtalkCount'
|
||||||
}, null))
|
}, null))
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
el: '#twikoo-wrap',
|
el: '#twikoo-wrap',
|
||||||
envId: GLOBAL_CONFIG.source.twikoo.twikooUrl,
|
envId: GLOBAL_CONFIG.source.twikoo.twikooUrl,
|
||||||
region: '',
|
region: '',
|
||||||
|
path: location.pathname.replace(/\/page\/\d$/, ""),
|
||||||
onCommentLoaded: function () {
|
onCommentLoaded: function () {
|
||||||
btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.tk-owo-emotion)'))
|
btf.loadLightbox(document.querySelectorAll('#twikoo .tk-content img:not(.tk-owo-emotion)'))
|
||||||
typeof hljs === 'object' && hljs.highlightAll()
|
typeof hljs === 'object' && hljs.highlightAll()
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
serverURL: GLOBAL_CONFIG.source.waline.serverURL,
|
serverURL: GLOBAL_CONFIG.source.waline.serverURL,
|
||||||
pageview: false,
|
pageview: false,
|
||||||
dark: 'html[data-theme="dark"]',
|
dark: 'html[data-theme="dark"]',
|
||||||
path: window.location.pathname,
|
path: window.location.pathname.replace(/\/page\/\d$/, ""),
|
||||||
comment: false,
|
comment: false,
|
||||||
locale:GLOBAL_CONFIG.source.waline.locale
|
locale:GLOBAL_CONFIG.source.waline.locale
|
||||||
}, null))
|
}, null))
|
||||||
|
|
|
@ -12,7 +12,7 @@ if(GLOBAL_CONFIG.htmlType!='comments' && document.querySelector('#post-comment')
|
||||||
//token获取见上方
|
//token获取见上方
|
||||||
accessToken: GLOBAL_CONFIG.source.twikoo.accessToken,
|
accessToken: GLOBAL_CONFIG.source.twikoo.accessToken,
|
||||||
mailMd5: GLOBAL_CONFIG.source.comments.mailMd5,
|
mailMd5: GLOBAL_CONFIG.source.comments.mailMd5,
|
||||||
pageUrl: window.location.pathname,
|
pageUrl: window.location.pathname.replace(/\/page\/\d$/, ""),
|
||||||
barrageTimer: [],
|
barrageTimer: [],
|
||||||
barrageList: [],
|
barrageList: [],
|
||||||
siteName: GLOBAL_CONFIG.source.artalk.siteName,
|
siteName: GLOBAL_CONFIG.source.artalk.siteName,
|
||||||
|
|
Loading…
Reference in New Issue