diff --git a/api/promotion/article.js b/api/promotion/article.js index 85d89193..4dbc9bec 100644 --- a/api/promotion/article.js +++ b/api/promotion/article.js @@ -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 芋艿:后续要做调整 + }); +} diff --git a/pages/news_details/index.vue b/pages/news_details/index.vue index b653b256..49481a3b 100644 --- a/pages/news_details/index.vue +++ b/pages/news_details/index.vue @@ -114,6 +114,8 @@ } // #endif }); + // 增加文章浏览量 + ArticleApi.addArticleBrowseCount(this.id) }, goodInfo(id) { ProductSpuApi.getSpuDetail(id).then(res=>{