Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Hexo Next 主题插件会重复发送请求 #1059

Closed
zhangnew opened this issue May 25, 2022 · 1 comment
Closed

[Bug]: Hexo Next 主题插件会重复发送请求 #1059

zhangnew opened this issue May 25, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@zhangnew
Copy link

问题描述 | Describe the bug

Hexo Next 主题插件,commentarticle 接口会连续发送两个一样的请求,发送请求的代码看起来是在这一部分:
watchEffect 函数也触发了一次请求

if (app) app.mount(root!);
updateCommentCount();
updatePageviewCount();
const stopComment = watchEffect(updateCommentCount);
const stopPageview = watchEffect(updatePageviewCount);

看起来是新版的问题,比如: link 1 link 2
这个旧版本的没问题:link 3

连续发送两个请求还会导致 Counter 表数据重复,为同一个 url 创建两条记录

问题网站 | Website URL

https://zhangnew.com/isso-to-waline.html

服务部署在哪里? | Where your waline deploy?

Docker

数据存储在哪里?| Where your comment data store?

SQLite

@zhangnew zhangnew added the bug Something isn't working label May 25, 2022
@Mister-Hope
Copy link
Member

Nice catch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants