From 90f0a0962df48f436d0b6a2e6348a3a1465bc453 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=AE=BF=E6=98=95?= Date: Mon, 8 Mar 2021 14:13:17 +0800 Subject: [PATCH] =?UTF-8?q?duration=5Funit=E5=8F=96=E6=B6=88=E5=B9=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/service_shop/services_shop.vue | 5 +++- src/pages/service_shop/shop_car_apply.vue | 32 +++++++---------------- 2 files changed, 13 insertions(+), 24 deletions(-) diff --git a/src/pages/service_shop/services_shop.vue b/src/pages/service_shop/services_shop.vue index b39291b..b1fb798 100644 --- a/src/pages/service_shop/services_shop.vue +++ b/src/pages/service_shop/services_shop.vue @@ -126,7 +126,10 @@ export default { getBenner() { this.$api.serviceShop.getBenner().then((response) => { if (response.data.success == 1) { - this.banners = response.data.data; + let arr = response.data.data; + if (arr && arr.length != 0) { + this.banners = response.data.data; + } } }); }, diff --git a/src/pages/service_shop/shop_car_apply.vue b/src/pages/service_shop/shop_car_apply.vue index 3f541ba..3afaa42 100644 --- a/src/pages/service_shop/shop_car_apply.vue +++ b/src/pages/service_shop/shop_car_apply.vue @@ -173,8 +173,7 @@ export default { this.service_arr[0]["auth"] = data.org_name; this.service_arr[0]["size"] = "应用镜像部署权限:" + data.price + "金币/月"; - this.service_arr[0]["applytype"] = - "申请方式:" + (app_data.duration_unit == 1 ? "月" : "年"); + this.service_arr[0]["applytype"] = "申请方式:" + "月"; this.service_arr[0]["num"] = `${app_data.duration}个月`; this.service_arr[0]["count"] = app_data.duration * parseFloat(data.price) + "金币"; @@ -226,12 +225,8 @@ export default { objs.num = "不限时长"; count = el.money; } else { - size = `${el.money}金币/${ - el.duration_unit == 1 ? "月" : "年" - }`; - objs.num = - service_data.duration + - (el.duration_unit == 1 ? "个月" : "年"); + size = `${el.money}金币/月`; + objs.num = service_data.duration + "个月"; count = service_data.duration * el.money; } objs.size = size; @@ -239,8 +234,7 @@ export default { this.all_cost = count; } }); - objs.applytype = - "申请方式:" + (service_data.duration_unit == 1 ? "月" : "年"); + objs.applytype = "申请方式:" + "月"; objs.isMg = data.openness == 3; if (data.data_service_type1 != 36) { objs.data = JSON.parse(data.res_fields); @@ -400,11 +394,8 @@ export default { this.service_arr[l]["auth"] = e.application.org_name; this.service_arr[l]["size"] = "应用镜像部署权限:" + e.application.price + "金币/月"; - this.service_arr[l]["applytype"] = - "申请方式:" + (e.duration_method == 1 ? "月" : "年"); - this.service_arr[l]["num"] = `${e.duration}${ - e.duration_unit == 1 ? "个月" : "年" - }`; + this.service_arr[l]["applytype"] = "申请方式:月"; + this.service_arr[l]["num"] = `${e.duration}个月`; this.service_arr[l]["count"] = e.duration * parseFloat(e.application.price) + "金币"; this.service_arr[l]["isMg"] = false; @@ -442,19 +433,14 @@ export default { }); spcs_type_2.forEach((el, ind) => { if (e.spec_id == el.id) { - this.service_arr[l]["size"] = `时长收费:${el.money}金币/${ - el.duration_unit == 1 ? "月" : "年" - }`; - this.service_arr[l]["num"] = `${e.duration}${ - el.duration_unit == 1 ? "个月" : "年" - }`; + this.service_arr[l]["size"] = `时长收费:${el.money}金币/月`; + this.service_arr[l]["num"] = `${e.duration}个月`; this.service_arr[l]["count"] = e.duration * el.money + "金币"; temp_cost = this.floatAdd(temp_cost, e.duration * el.money); } }); - this.service_arr[l]["applytype"] = - "申请方式:" + (e.duration_method == 1 ? "月" : "年"); + this.service_arr[l]["applytype"] = "申请方式:月"; this.service_arr[l]["isMg"] = e.service.openness == 3; this.service_arr[l]["data"] = e.service.res_fields ? JSON.parse(e.service.res_fields) -- 2.26.0