From cda5bf0be084d6628545ee9ef89c4a28033c4984 Mon Sep 17 00:00:00 2001 From: zhaofang <752743406@qq.com> Date: Tue, 7 Jun 2022 16:53:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/modules/shares.js | 2 +- src/views/case/ManageList.vue | 4 +-- src/views/share/MyList.vue | 48 +++++++++++++++++++++++++++++++++++ 3 files changed, 51 insertions(+), 3 deletions(-) diff --git a/src/api/modules/shares.js b/src/api/modules/shares.js index 07b5dfb7..2dad7837 100644 --- a/src/api/modules/shares.js +++ b/src/api/modules/shares.js @@ -33,7 +33,7 @@ const remove=function(objId,objType){ // toAname 分享给人的名称 // const querylist=function(query){ - return ajax.post('/xboe/m/share/list',data); + return ajax.post('/xboe/m/share/list',query); } // 当前用户是否已分享 // // objType,点赞对象类型,, 1课程 2文章,3案例, 4问答 diff --git a/src/views/case/ManageList.vue b/src/views/case/ManageList.vue index e41ea03c..ba2d53ad 100644 --- a/src/views/case/ManageList.vue +++ b/src/views/case/ManageList.vue @@ -158,8 +158,8 @@ export default { }, methods: { reset() { - this.queryObj.isTop = '' - this.queryObj.keyWord = '' + this.queryObj.isTop = ''; + this.queryObj.keyWord = ''; this.getData() }, //获取案例列表数据 diff --git a/src/views/share/MyList.vue b/src/views/share/MyList.vue index 7834cc98..90510e02 100644 --- a/src/views/share/MyList.vue +++ b/src/views/share/MyList.vue @@ -48,6 +48,30 @@ + +
+ + + + +
+
@@ -153,12 +177,16 @@ if (this.tabName == 'qa') { this.findQa(); } + if (this.tabName == 'case') { + this.findCase(); + } if (this.tabName == 'article') { this.findArticle(); } if (this.tabName == 'course') { this.findCourse(); } + }, resData() { this.keyword = ''; @@ -190,6 +218,10 @@ if (tab.name == 'course') { this.findCourse(); } + console.log(tab.name,'tab.name'); + if (tab.name == 'case') { + this.findCase(); + } }, //分页点击事件 handleSizeChange(value) { @@ -205,6 +237,10 @@ this.courseList.pageSize = value; this.findCourse(); } + if (this.tabName == 'case') { + this.caseList.pageSize = value; + this.findCase(); + } }, //分页点击事件 handleCurrentChange(value) { @@ -220,6 +256,18 @@ this.courseList.pageIndex = value; this.findCourse(); } + if (this.tabName == 'case') { + this.caseList.pageIndex = value; + this.findCase(); + } + }, + // 案例数据查询 + findCase() { + let { pageIndex, pageSize } = this.caseList; + let query = { pageIndex, pageSize,keyword:this.keyword,isRead: this.isRead,objType:3}; + apiShares.myCaseList(query).then(res=>{ + console.log(res,'res'); + }) }, //问答数据查询 findQa() {