From 6c4ae85f86dfa55a59c852870a7fec282ffccab2 Mon Sep 17 00:00:00 2001 From: wuhui_zzw <1760308791@qq.com> Date: Thu, 23 May 2024 17:06:16 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=EF=BC=9A=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E6=94=AF=E6=8C=81=E6=8C=87=E5=AE=9A=E5=88=86?= =?UTF-8?q?=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/api.js | 38 +++++++++++++++++++++----------------- pages/news_list/index.vue | 31 +++++++++++++++++++++++++++---- 2 files changed, 48 insertions(+), 21 deletions(-) diff --git a/api/api.js b/api/api.js index 3107d86..12fc1d5 100644 --- a/api/api.js +++ b/api/api.js @@ -2,11 +2,11 @@ import request from "@/utils/request.js"; /** * 公共接口 ,优惠券接口 , 行业此讯 , 手机号码注册 - * + * */ /** * 获取主页数据 无需授权 - * + * */ export function getIndexData() { @@ -20,7 +20,7 @@ export function getAppVersion() { } /** * 获取登录授权login - * + * */ export function getLogo() { @@ -28,7 +28,7 @@ export function getLogo() } /** * 保存form_id - * @param string formId + * @param string formId */ export function setFormId(formId) { return request.post("wechat/set_form_id", { formId: formId}); @@ -36,7 +36,7 @@ export function setFormId(formId) { /** * 领取优惠卷 * @param int couponId - * + * */ export function setCouponReceive(couponId){ return request.post('coupon/receive/'+couponId); @@ -64,37 +64,41 @@ export function getUserCoupons(data){ } /** * 文章分类列表 - * -*/ + * + */ export function getArticleCategoryList(){ - return request.get('article/category/lst',{},{noAuth:true}) + return request.get('article/category/lst',{},{noAuth:true}) +} +// 文章分类详情 +export function getArticleCategoryInfo(id){ + return request.get('article/category/info/'+id,{},{noAuth:true}) } /** * 文章列表 * @param int cid - * + * */ export function getArticleList(cid,data){ return request.get('article/lst/' + cid, data,{noAuth:true}) } /** * 文章 热门列表 - * + * */ export function getArticleHotList(){ return request.get('article/hot/list',{},{noAuth:true}); } /** * 文章 轮播列表 - * + * */ export function getArticleBannerList(){ return request.get('article/banner/list',{},{noAuth:true}) } /** * 文章详情 - * @param int id - * + * @param int id + * */ export function getArticleDetails(id){ return request.get('article/detail/'+id,{},{noAuth:true}); @@ -123,7 +127,7 @@ export function registerVerify(phone, reset, key, code){ /** * 手机号注册 * @param object data - * + * */ export function phoneRegister(data){ return request.post('register',data,{noAuth:true}); @@ -131,7 +135,7 @@ export function phoneRegister(data){ /** * 手机号修改密码 * @param object data - * + * */ export function phoneRegisterReset(data){ return request.post('register/reset',data,{noAuth:true}) @@ -139,7 +143,7 @@ export function phoneRegisterReset(data){ /** * 手机号+密码登录 * @param object data - * + * */ export function phoneLogin(data){ return request.post('login',data,{noAuth:true}) @@ -337,4 +341,4 @@ export function getCateData(data) { return request.get("diy/category", data, { noAuth: true }); -} \ No newline at end of file +} diff --git a/pages/news_list/index.vue b/pages/news_list/index.vue index 70343a3..70baefb 100644 --- a/pages/news_list/index.vue +++ b/pages/news_list/index.vue @@ -48,16 +48,17 @@