Skip to content

Commit

Permalink
文章详情页面:新增调用增加浏览量接口
Browse files Browse the repository at this point in the history
  • Loading branch information
puhui999 committed Oct 20, 2023
1 parent 24c3709 commit 85af097
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions api/promotion/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,10 @@ export function getArticle(id) {
noAuth: true // TODO 芋艿:后续要做调整
});
}

// 增加文章浏览量
export function addArticleBrowseCount(id) {
return request.put("app-api/promotion/article/add-browse-count?id=" + id, {}, {
noAuth: true // TODO 芋艿:后续要做调整
});
}
2 changes: 2 additions & 0 deletions pages/news_details/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@
}
// #endif
});
// 增加文章浏览量
ArticleApi.addArticleBrowseCount(this.id)
},
goodInfo(id) {
ProductSpuApi.getSpuDetail(id).then(res=>{
Expand Down

0 comments on commit 85af097

Please sign in to comment.