From 6db3ce8f33c06a0de97175168541946ec112dfc8 Mon Sep 17 00:00:00 2001 From: wuxw <928255095@qq.com> Date: Fri, 11 Jul 2025 14:31:53 +0800 Subject: [PATCH] 优化 post 显示动画 --- src/api/community/communityManageApi.js | 31 ++++++++++--------------------- src/components/community/communityDataToIot.vue | 8 ++------ src/utils/request.js | 51 ++++++++++++++++++++++++++++++++++++++++++--------- src/views/community/communityManageList.vue | 8 ++++---- 4 files changed, 58 insertions(+), 40 deletions(-) diff --git a/src/api/community/communityManageApi.js b/src/api/community/communityManageApi.js index 1d342fe..cd8d5b6 100644 --- a/src/api/community/communityManageApi.js +++ b/src/api/community/communityManageApi.js @@ -30,7 +30,7 @@ export function listAreas(params) { }).then(response => { const res = response.data - resolve(res) + resolve(res) }).catch(error => { reject(error) @@ -67,11 +67,8 @@ export function updateCommunity(data) { data }).then(response => { const res = response.data - if (res.code === 0) { - resolve(res) - } else { - reject(new Error(res.msg || '更新小区失败')) - } + resolve(res) + }).catch(error => { reject(error) }) @@ -87,11 +84,8 @@ export function deleteCommunity(data) { data }).then(response => { const res = response.data - if (res.code === 0) { - resolve(res) - } else { - reject(new Error(res.msg || '删除小区失败')) - } + resolve(res) + }).catch(error => { reject(error) }) @@ -107,11 +101,8 @@ export function sendCommunityToIot(data) { data }).then(response => { const res = response.data - if (res.code === 0) { - resolve(res) - } else { - reject(new Error(res.msg || '同步到IOT失败')) - } + resolve(res) + }).catch(error => { reject(error) }) @@ -127,11 +118,9 @@ export function auditEnterCommunity(data) { data }).then(response => { const res = response.data - if (res.code === 0) { - resolve(res) - } else { - reject(new Error(res.msg || '撤回审核失败')) - } + + resolve(res) + }).catch(error => { reject(error) }) diff --git a/src/components/community/communityDataToIot.vue b/src/components/community/communityDataToIot.vue index 25e8cd7..41a3926 100644 --- a/src/components/community/communityDataToIot.vue +++ b/src/components/community/communityDataToIot.vue @@ -1,10 +1,6 @@ @@ -202,7 +202,7 @@ export default { const { data } = await getAttrSpecList({ page: 1, row: 100, - tableName:'building_community_attr' + tableName: 'building_community_attr' }) this.communityManageInfo.listColumns = [] data.forEach(item => { -- libgit2 0.21.4