diff --git a/src/api/community/communityManageApi.js b/src/api/community/communityManageApi.js index 1d342feae..cd8d5b669 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 25e8cd7ce..41a3926d2 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 => {