From eccf1a427c8189cba2a8002efb4fae4e911e34f9 Mon Sep 17 00:00:00 2001 From: 86182 Date: Wed, 1 Jun 2022 10:58:08 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E5=88=86=E4=BA=AB=E7=9A=84=E5=85=A8?= =?UTF-8?q?=E9=83=A8=E5=92=8C=E5=88=86=E4=BA=AB=E7=BB=99=E6=88=91=E7=9A=84?= =?UTF-8?q?=E5=85=A8=E9=83=A8=EF=BC=8C=E6=89=B9=E9=87=8F=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E6=98=AF=E5=90=A6=E5=B7=B2=E6=94=B6=E8=97=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/favorites.js | 18 +++++++++++++----- src/api/modules/shares.js | 29 +++++++++++++++++++++++++++-- 2 files changed, 40 insertions(+), 7 deletions(-) diff --git a/src/api/modules/favorites.js b/src/api/modules/favorites.js index 1273fcf2..165bc5c1 100644 --- a/src/api/modules/favorites.js +++ b/src/api/modules/favorites.js @@ -34,7 +34,7 @@ const casePageList=function(query){ /*分页查询 收藏的文章信息 *@param {Object} query @param Integer type 根据什么类型搜索,这块暂时不传 - @param pageIndex 第几页 pageSize 每页展示多少行 + @param pageIndex 第几页 pageSize 每页展示多少行 keyword:对应关键字查询 */ const articlePageList=function(query){ @@ -45,7 +45,7 @@ const articlePageList=function(query){ @param Integer type 根据什么类型搜索,暂时不传 @param pageIndex 第几页 pageSize 每页展示多少行 keyword:对应关键字查询 - + */ const coursePageList=function(query){ return ajax.post('/xboe/m/favorite/mycourselist',query); @@ -85,16 +85,23 @@ const has=function(objType,objId){ */ const findAll=function(query){ return ajax.post('/xboe/m/favorite/findAll',query); -} +} /* 我的收藏 全部 @param pageIndex 第几页 @param pageSize 每页行数 -@param keyword 关键字 +@param keyword 关键字 */ const queryAll=function(query){ return ajax.post('/xboe/m/favorite/queryAll',query); } +/** + * 查看是否已收藏 批量 + * @param {问答或者文章或者课程的id数组} data + * */ +const isNoFavorite=function(date){ + return ajax.postJson('/xboe/m/favorite/isNoFavorite',data); +} export default{ has, @@ -107,5 +114,6 @@ export default{ articlePageList, coursePageList, findAll, - queryAll + queryAll, + isNoFavorite } diff --git a/src/api/modules/shares.js b/src/api/modules/shares.js index 9af4635a..b8677cb4 100644 --- a/src/api/modules/shares.js +++ b/src/api/modules/shares.js @@ -112,7 +112,7 @@ const mymearticlelist=function(query){ */ const updateIsRead=function(id){ return ajax.get(`/xboe/m/share/updateIsRead?id=${id}`); -} +} /* 撤回分享 @@ -121,6 +121,29 @@ const updateIsRead=function(id){ const deleteshares=function(id){ return ajax.get(`/xboe/m/share/delete-shares?id=${id}`); } +/** + * 我分享的全部 + * @param pageIndex 第几页 + * @param pageSize 每页多少行 + * @param keyword 关键字搜索 + * @param isRead 是否已读 + * */ +const findMeShare=function (query){ + return ajax.post('/xboe/m/share/findMeShare',query); +} +/** + * 分享给我的全部 + * @param pageIndex 第几页 + * @param pageSize 每页多少行 + * @param keyword 关键字搜索 + * @param isRead 是否已读 + * */ +const findShareMe=function (query){ + return ajax.post('/xboe/m/share/findShareMe',query); +} + +/** + * */ export default{ save, has, @@ -134,5 +157,7 @@ const deleteshares=function(id){ mymecourselist, mymearticlelist, updateIsRead, - deleteshares + deleteshares, + findMeShare, + findShareMe }