fix 融合服务bug

This commit is contained in:
guoyue 2022-08-10 17:52:49 +08:00
parent 3f3fc65ff5
commit 0b718307d8
2 changed files with 30 additions and 18 deletions

View File

@ -19,18 +19,23 @@
<div class="hengxian"></div> <div class="hengxian"></div>
</div> </div>
</div> </div>
<div v-loading="loadingData">
<searchResultList v-show="resourceList.data && resourceList.data.length > 0" :key="listKey2" <searchResultList v-show="resourceList.data && resourceList.data.length > 0" :key="listKey2"
:resourceList="resourceList" :resourceTotal="resourceTotal" :selectCardsname="number == 0 ? '融合服务' : '赋能场景'" /> :resourceList="resourceList" :resourceTotal="resourceTotal"
:selectCardsname="number == 0 ? '融合服务' : '赋能场景'" />
<div class="pagination"> <div class="pagination">
<a-pagination v-if="resourceList.data && resourceList.data.length > 0" v-model:current="currentPage" <a-pagination v-if="resourceList.data && resourceList.data.length > 0" v-model:current="currentPage"
v-model:pageSize="currentPageSize" show-size-changer show-less-items show-quick-jumper :total="resourceTotal" v-model:pageSize="currentPageSize" show-size-changer show-less-items show-quick-jumper
:page-size-options="pageSizeOptions" @change="pageChange" @showSizeChange="onShowSizeChange" /> :total="resourceTotal" :page-size-options="pageSizeOptions" @change="pageChange"
@showSizeChange="onShowSizeChange" />
</div> </div>
<div v-if="resourceList.data && resourceList.data.length <= 0" style="margin-top: 2rem"> <div v-if="resourceList.data && resourceList.data.length <= 0" style="margin-top: 2rem">
<a-empty /> <a-empty />
</div> </div>
</div> </div>
</div> </div>
</div>
<home-footer></home-footer> <home-footer></home-footer>
</template> </template>
<script> <script>
@ -58,6 +63,7 @@ export default defineComponent({
const resourceList = reactive({ data: [] }) const resourceList = reactive({ data: [] })
const resourceTotal = ref(0) const resourceTotal = ref(0)
const current = ref(1) const current = ref(1)
const loadingData = ref(false)
// //
const titleName = ref([ const titleName = ref([
{ {
@ -120,6 +126,8 @@ export default defineComponent({
// //
const getIntegrationList = () => { const getIntegrationList = () => {
loadingData.value = true;
console.log('获取融合服务列表------------>');
let postData = { let postData = {
limit: currentPageSize.value, limit: currentPageSize.value,
page: currentPage.value, page: currentPage.value,
@ -130,13 +138,17 @@ export default defineComponent({
} }
getIntegrationServicesList(postData).then( getIntegrationServicesList(postData).then(
(res) => { (res) => {
loadingData.value = false;
if (res.data.code !== 0) { if (res.data.code !== 0) {
return message.error(res.data.msg) return message.error(res.data.msg)
} }
console.log('res.data------------>', res.data);
resourceList.data = res.data.data.list || [] resourceList.data = res.data.data.list || []
resourceTotal.value = res.data.data.total || 0 resourceTotal.value = res.data.data.total || 0
}, },
(err) => { (err) => {
loadingData.value = false;
message.error(err) message.error(err)
} }
) )
@ -180,6 +192,7 @@ export default defineComponent({
} }
onMounted(() => { onMounted(() => {
console.log('222----onMounted-------->', 222);
listKey2.value++ listKey2.value++
getAppResources() getAppResources()
}) })
@ -215,6 +228,7 @@ export default defineComponent({
titleName, titleName,
changeCards, changeCards,
number, number,
loadingData,
} }
}, },
components: { components: {

View File

@ -20,7 +20,9 @@
</div> </div>
</div> </div>
<div class="flex-row-start desc"> <div class="flex-row-start desc">
<a-tooltip placement="topLeft" :title="detailInfoObj.description || '--'">
<div class="desc">描述{{ detailInfoObj.description || '--' }}</div> <div class="desc">描述{{ detailInfoObj.description || '--' }}</div>
</a-tooltip>
</div> </div>
<div class="btn-box"> <div class="btn-box">
<a-button size="big" class="btn-text" type="primary" @click="handleAKeyApplication()"> <a-button size="big" class="btn-text" type="primary" @click="handleAKeyApplication()">
@ -29,12 +31,11 @@
</template> </template>
申请使用 申请使用
</a-button> </a-button>
<a-button size="big" class="btn-text" :type="detailInfoObj.isCollect == 'true' ? 'primary' : ''" <a-button size="big" class="btn-text" type="primary" @click="addCollect()">
@click="addCollect()">
<template #icon> <template #icon>
<form-outlined /> <form-outlined />
</template> </template>
收藏 {{ detailInfoObj.isCollect == 'true' ? '已收藏' : '收藏' }}
</a-button> </a-button>
</div> </div>
</div> </div>
@ -299,12 +300,10 @@ getIntegrationServicesDeatil(id)
.name { .name {
font-size: 0.16rem; font-size: 0.16rem;
margin-bottom: 0.2rem;
margin-top: 0.2rem;
} }
.area { .area {
margin-bottom: 0.2rem; margin: 0.1rem 0;
} }
.desc { .desc {
@ -319,7 +318,7 @@ getIntegrationServicesDeatil(id)
.btn-box { .btn-box {
position: absolute; position: absolute;
bottom: 0; bottom: -15px;
left: 0.2rem; left: 0.2rem;
.btn-text { .btn-text {
@ -341,5 +340,4 @@ getIntegrationServicesDeatil(id)
.list-box { .list-box {
padding: 0.4rem; padding: 0.4rem;
} }
</style> </style>