From 37c22b5c255afe5e9ebba614af89117de12bfebb Mon Sep 17 00:00:00 2001 From: a0049873 <79py69t9wb@privaterelay.appleid.com> Date: Tue, 14 Jun 2022 18:57:55 +0800 Subject: [PATCH] =?UTF-8?q?BUG=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- front/src/views/home/DetailsPageconetent.vue | 67 ++++++++++--------- .../home/components/searchResultList.vue | 18 ++++- 2 files changed, 50 insertions(+), 35 deletions(-) diff --git a/front/src/views/home/DetailsPageconetent.vue b/front/src/views/home/DetailsPageconetent.vue index 370144a2..ce6f6c4c 100644 --- a/front/src/views/home/DetailsPageconetent.vue +++ b/front/src/views/home/DetailsPageconetent.vue @@ -994,21 +994,24 @@ const getAppResources = () => { paramsGetResources.name = searchValue.value paramsGetResources.type = Cardsname.value - if(paramsGetResources.type=='组件服务' || paramsGetResources.type=='应用资源'){ + if ( + paramsGetResources.type == '组件服务' || + paramsGetResources.type == '应用资源' + ) { pageWithAttrs(paramsGetResources).then((res) => { console.log('查询列表============>', resourceList, res.data.data) resourceList.data = [] videoList.data = [] - // resourceList.data = res.data.data.records || [] - resourceTotal.value = res.data.data.total || '' - getShoppingCartList(res.data.data.records) - console.log( - '其他~~~~~~~~~~~', - resourceList.data, - resourceTotal.value - ) + // resourceList.data = res.data.data.records || [] + resourceTotal.value = res.data.data.total || '' + getShoppingCartList(res.data.data.records) + console.log( + '其他~~~~~~~~~~~', + resourceList.data, + resourceTotal.value + ) }) - }else if(paramsGetResources.type=='基础设施'){ + } else if (paramsGetResources.type == '基础设施') { // videoList.data = res.data.data.records || [] // resourceTotal.value = infrastructure.value.data.total || '' // getShoppingCartList(infrastructure.value.data.records) @@ -1017,34 +1020,32 @@ // resourceTotal.value, // resourceList.data // ) - const params = { - name: searchValue.value || '', - pageNo: paramsGetResources.pageNum, - pageSize: paramsGetResources.pageSize - } - getVideoList(params).then((res) => { - // 赋值 - res.data.data.list.forEach(val =>{ - val.name = val.serviceName - val.createDate = val.updateTime + const params = { + name: searchValue.value || '', + pageNo: paramsGetResources.pageNum, + pageSize: paramsGetResources.pageSize, + } + getVideoList(params).then((res) => { + // 赋值 + res.data.data.list.forEach((val) => { val.id = val.serviceId }) resourceTotal.value = res.data.data.total resourceList.data = res.data.data.list - }) - }else if(paramsGetResources.type=='数据资源'){ - const obj ={ - serviceName:searchValue.value, - orderField:'updateTime', - orderType:'desc', - pageNum:paramsGetResources.pageNum, - pageSize:paramsGetResources.pageSize, - serviceType:'data', + }) + } else if (paramsGetResources.type == '数据资源') { + const obj = { + serviceName: searchValue.value, + orderField: 'updateTime', + orderType: 'desc', + pageNum: paramsGetResources.pageNum, + pageSize: paramsGetResources.pageSize, + serviceType: 'data', // rq=1655196484308.0234 } - getRecord(obj).then(res => { - if(res.data.data){ - res.data.data.list.forEach(val =>{ + getRecord(obj).then((res) => { + if (res.data.data) { + res.data.data.list.forEach((val) => { val.name = val.serviceName val.createDate = val.updateTime val.id = val.serviceId @@ -1054,7 +1055,7 @@ // "shareStatus": "2" }) resourceList.data = res.data.data.list || [] - resourceTotal.value = resourceData.value.data.total || '' + resourceTotal.value = res.data.data.total || '' // getShoppingCartList(resourceData.value.data.records) console.log( '数据资源~~~~~~~~~~~', diff --git a/front/src/views/home/components/searchResultList.vue b/front/src/views/home/components/searchResultList.vue index a628c6e8..d0fbef4f 100644 --- a/front/src/views/home/components/searchResultList.vue +++ b/front/src/views/home/components/searchResultList.vue @@ -103,11 +103,25 @@