diff --git a/src/pages/service_shop/services_shop.vue b/src/pages/service_shop/services_shop.vue index b39291b1c810e9d8da0ec33f2f07b89bde80c75a..b1fb798d92a3814e17847ef5856169f0c1919c70 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 3f541ba7687b074692f8a138d0bdd7a5f0f5ee7c..3afaa42c966b8f35798fac93200505e352c9aad8 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)