From 8e00cfa1f85ba3d3e44336873fd3a1113afdd018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=AE=BF=E6=98=95?= Date: Fri, 30 Oct 2020 16:22:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B4=AD=E7=89=A9=E8=BD=A6=E3=80=82=E3=80=82?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/service-info/service-info.vue | 32 +++-- src/components/shop-cloud/shop-cloud.vue | 30 ++--- .../shopping-cart/shopping-cart-cell.vue | 111 ++++++++++++++---- .../shopping-cart/shopping-cart-com.vue | 32 +++-- src/pages/service_shop/gzfwDetail.vue | 1 + src/pages/service_shop/sjfwDetail.vue | 1 + src/pages/service_shop/skfwDetail.vue | 1 + src/pages/service_shop/zhfwDetail.vue | 1 + 8 files changed, 155 insertions(+), 54 deletions(-) diff --git a/src/components/service-info/service-info.vue b/src/components/service-info/service-info.vue index 0c95d4a..9b9e2c4 100644 --- a/src/components/service-info/service-info.vue +++ b/src/components/service-info/service-info.vue @@ -82,8 +82,9 @@ 计次收费规格: 暂无时长收费规格: 暂无 ({ types: [], - type: 0, // 购买方式 1:按月,2:按年 + type: 1, // 购买方式 1:按月,2:按年 specification: {}, // 规格 duration: 1, // 时长 showTime: false, @@ -193,7 +195,13 @@ export default { computed: { actionDisabled() { let a = this.data.serviceRequestSpcs; - return a.spcs_type_1.length == 0 && a.spcs_type_2.length == 0; + return ( + a && + a.spcs_type_1 && + a.spcs_type_1.length == 0 && + a.spcs_type_2 && + a.spcs_type_2.length == 0 + ); }, }, watch: {}, @@ -294,9 +302,17 @@ export default { } // 初始化规格 - if (this.data.serviceRequestSpcs.spcs_type_1.length > 0) { + if ( + this.data.serviceRequestSpcs && + this.data.serviceRequestSpcs.spcs_type_1 && + this.data.serviceRequestSpcs.spcs_type_1.length > 0 + ) { this.specification = this.data.serviceRequestSpcs.spcs_type_1[0]; - } else if (this.data.serviceRequestSpcs.spcs_type_2.length > 0) { + } else if ( + this.data.serviceRequestSpcs && + this.data.serviceRequestSpcs.spcs_type_2 && + this.data.serviceRequestSpcs.spcs_type_2.length > 0 + ) { this.specification = this.data.serviceRequestSpcs.spcs_type_2[0]; } }, diff --git a/src/components/shop-cloud/shop-cloud.vue b/src/components/shop-cloud/shop-cloud.vue index f5943b8..2cb6c83 100644 --- a/src/components/shop-cloud/shop-cloud.vue +++ b/src/components/shop-cloud/shop-cloud.vue @@ -639,7 +639,7 @@ 一键申请 一键申请 @@ -99,6 +101,8 @@