From cf1f75fd8313c2664b836d6277f3fdb6fb399256 Mon Sep 17 00:00:00 2001 From: "851673013@qq.com" <851673013@qq.com> Date: Wed, 29 Jun 2022 11:37:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=83=BD=E5=8A=9B=E9=9B=86=E5=B8=82=E5=88=86?= =?UTF-8?q?=E9=A1=B5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/DetailsPageconetent.vue | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/front/src/views/home/DetailsPageconetent.vue b/front/src/views/home/DetailsPageconetent.vue index 2082dd47..931abc69 100644 --- a/front/src/views/home/DetailsPageconetent.vue +++ b/front/src/views/home/DetailsPageconetent.vue @@ -1038,8 +1038,8 @@ const resourceList = reactive({ data: [] }) const videoList = reactive({ data: [] }) const resourceTotal = ref('') - const getAppResources = () => { - paramsGetResources.pageNum = 1 + const getAppResources = (switchIndex) => { + //switchIndex这个参数是下面的分页传过来的参数 paramsGetResources.name = searchValue.value paramsGetResources.type = Cardsname.value console.log( @@ -1050,7 +1050,10 @@ !whoShow1.value.itShowBaoTou && paramsGetResources.type === '数据资源' ) { - getDataResource({ + if (switchIndex != '分页查询') { + paramsGetResources.pageNum = 1 + } + let dataResourceParams = { serviceName: paramsGetResources.name, //资源名称 orderField: whoShow1.value.itShowQingDao ? paramsGetResources.orderField == 'applyCount' @@ -1062,7 +1065,8 @@ orderType: paramsGetResources.orderType.toLowerCase(), //排序方式:desc,asc pageNum: paramsGetResources.pageNum, //页码 pageSize: paramsGetResources.pageSize, //分页大小 - }).then((res) => { + } + getDataResource(dataResourceParams).then((res) => { console.log('数据资源==================>', res.data.data) if (whoShow1.value.itShowQingDao) { res.data.data.data.forEach((val) => { @@ -1092,6 +1096,10 @@ } }) } else if (paramsGetResources.type !== '数据资源') { + if (switchIndex != '分页查询') { + paramsGetResources.pageNum = 1 + } + debugger pageWithAttrs(paramsGetResources).then((res) => { console.log('查询列表============>', resourceList, res.data.data) resourceList.data = [] @@ -1183,7 +1191,9 @@ loading.value = true currentPage.value = val paramsGetResources.pageNum = val - getAppResources() + let params = '分页查询' //判断是否是点击下面的分页的调用模糊查询方法还是点击搜索调用模糊查询方法 + getAppResources(params) + debugger } // const findZywMessage = () => { // zywMessage().then((res) => {