浏览代码

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)
       }