Skip to content

Commit

Permalink
!6 文章详情页面:新增调用增加浏览量接口
Browse files Browse the repository at this point in the history
Merge pull request !6 from puhui999/master
  • Loading branch information
YunaiV authored and gitee-org committed Oct 21, 2023
2 parents 24c3709 + 85af097 commit b5fc006
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 b5fc006

Please sign in to comment.