Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Commit

Permalink
perf: 阅读记录
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaviilee committed Jan 18, 2025
1 parent dab1960 commit ec445bf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"dependencies": {
"@jx3box/jx3box-comment-ui": "^2.0.2",
"@jx3box/jx3box-common": "^8.5.4",
"@jx3box/jx3box-common-ui": "^9.0.29",
"@jx3box/jx3box-common": "^8.5.6",
"@jx3box/jx3box-common-ui": "^9.0.32",
"@jx3box/jx3box-data": "^3.7.7",
"@jx3box/jx3box-editor": "^2.2.23",
"@jx3box/jx3box-talent": "^1.3.2",
Expand Down
19 changes: 12 additions & 7 deletions src/views/Single.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import singlebox from "@/components/cms-single";
// 本地数据
import { getPost } from "@/service/post.js";
import { getStat, postStat, postHistory } from "@jx3box/jx3box-common/js/stat";
import { getStat, postStat, postHistory, postReadHistory } from "@jx3box/jx3box-common/js/stat";
import { appKey } from "@/../setting.json";
import xfmap from "@jx3box/jx3box-data/data/xf/xf.json";
import { __ossRoot, __ossMirror, __iconPath, __imgPath } from "@jx3box/jx3box-common/data/jx3box.json";
Expand Down Expand Up @@ -76,12 +76,17 @@ export default {
document.title = this.post.post_title;
User.isLogin() && postHistory({
source_type: appKey,
source_id: ~~this.id,
link: location.href,
title: this.post.post_title,
});
if (User.isLogin()) {
User.isLogin() && postHistory({
source_type: appKey,
source_id: ~~this.id,
link: location.href,
title: this.post.post_title,
});
this.post.visible > 1 && postReadHistory({ id: this.id, category: "posts", subcategory: "default", visible_type: this.post.visible });
}
})
.finally(() => {
this.loading = false;
Expand Down

0 comments on commit ec445bf

Please sign in to comment.