소스 검색

feat(KIP-13066): 停车缴费首页功能管理逻辑优化

john 1 년 전
부모
커밋
35b06188f7
2개의 변경된 파일8개의 추가작업 그리고 4개의 파일을 삭제
  1. 4 2
      src/pages/parkingFee/mixins/parkingFee.js
  2. 4 2
      src/pages/parkingFeeV2/mixins/parkingFee.js

+ 4 - 2
src/pages/parkingFee/mixins/parkingFee.js

@@ -937,8 +937,10 @@ export default {
     async getPortalsByLbs() {
       try {
         const res = await getPortalsByLbs(this.groupId, this.mallId);
-        this.portalsByLbsList = res.displayFunctionList.filter(elm => elm.enabled).map(elm => elm.code)
-        this.portalsByLbsInfo = res
+        if(res.length) {
+          this.portalsByLbsList = res[0].displayFunctionList.filter(elm => elm.enabled).map(elm => elm.code)
+          this.portalsByLbsInfo = res[0]
+        }
       } catch (e) {
         console.log('getPortalsByLbs', e)
       }

+ 4 - 2
src/pages/parkingFeeV2/mixins/parkingFee.js

@@ -995,8 +995,10 @@ export default {
     async getPortalsByLbs() {
       try {
         const res = await getPortalsByLbs(this.groupId, this.mallId);
-        this.portalsByLbsList = res.displayFunctionList.filter(elm => elm.enabled).map(elm => elm.code)
-        this.portalsByLbsInfo = res
+        if(res.length) {
+          this.portalsByLbsList = res[0].displayFunctionList.filter(elm => elm.enabled).map(elm => elm.code)
+          this.portalsByLbsInfo = res[0]
+        }
       } catch (e) {
         console.log('getPortalsByLbs', e)
       }