优化:调用记录页面浏览量 API 时,增加时间戳来预防缓存
This commit is contained in:
@@ -30,7 +30,7 @@ export const head: HeadConfig[] = [
|
|||||||
['script', {}, `var pageUrl = location.href;
|
['script', {}, `var pageUrl = location.href;
|
||||||
(function() {
|
(function() {
|
||||||
xhr = new XMLHttpRequest();
|
xhr = new XMLHttpRequest();
|
||||||
xhr.open('GET', 'https://api.charles7c.top/blog/pv?pageUrl=' + pageUrl);
|
xhr.open('GET', 'https://api.charles7c.top/blog/pv?pageUrl=' + pageUrl + "&t=" + new Date().getTime());
|
||||||
xhr.send();
|
xhr.send();
|
||||||
})();`]
|
})();`]
|
||||||
/*['script', {}, `var pageUrl = location.href;
|
/*['script', {}, `var pageUrl = location.href;
|
||||||
|
Reference in New Issue
Block a user