Authored by 毕凯

Merge branch 'hotfix/commentscache' into 'release/6.6'

Hotfix/commentscache



See merge request !1378
... ... @@ -272,18 +272,19 @@ $(function() {
// tab
tabInit();
if (localStorage) {
if (sessionStorage) {
// 微信中点击之后,返回跳到指定位置
let totalH, scH;
let top = localStorage.changtu1;
let key = `PAGE_SCROLL_TOP_${location.href}`;
let top = sessionStorage.getItem(key);
window.scrollTo(0, top);
localStorage.removeItem('changtu1');
sessionStorage.removeItem(key);
$('a').click(function() {
totalH = event.pageY;
scH = event.clientY;
localStorage.changtu1 = totalH - scH; // 每次点击缓存高度
sessionStorage.setItem(key, totalH - scH); // 每次点击缓存高度
});
}
... ...