From 7ab376ab278e3b17158c960116e92e2e8d74cd34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=AE=BF=E6=98=95?= Date: Fri, 20 Nov 2020 13:48:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=8D=E5=8A=A1=E7=94=B3=E8=AF=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/order-list/order-list-cell.vue | 6 ++--- .../shopping-cart/shopping-cart-cell.vue | 2 +- src/pages/service_shop/shop_car_apply.vue | 26 ++++++++++--------- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/components/order-list/order-list-cell.vue b/src/components/order-list/order-list-cell.vue index fe0e42b..6ca631d 100644 --- a/src/components/order-list/order-list-cell.vue +++ b/src/components/order-list/order-list-cell.vue @@ -72,9 +72,9 @@
- {{ cellItem.spec_type == 1 ? "计次收费" : "时长收费" }}: + {{ cellItem.spcs_type == 1 ? "计次收费" : "时长收费" }}: {{ cellItem.single_money }}金币/ - {{ cellItem.spec_type == 1 ? cellItem.spec_count + "次" : "月" }} + {{ cellItem.spcs_type == 1 ? cellItem.spcs_count + "次" : "月" }}
@@ -440,7 +440,7 @@ export default { if (this.cellItem.order_type == 1) { query = { service_id: parseFloat(this.cellItem.service_id), - spec_id: this.cellItem.svc_spec_id, + spcs_id: this.cellItem.spcs_id, duration: this.cellItem.duration, duration_unit: this.cellItem.duration_unit, }; diff --git a/src/components/shopping-cart/shopping-cart-cell.vue b/src/components/shopping-cart/shopping-cart-cell.vue index 817db74..0588b5e 100644 --- a/src/components/shopping-cart/shopping-cart-cell.vue +++ b/src/components/shopping-cart/shopping-cart-cell.vue @@ -360,7 +360,7 @@ export default { let query = { id: this.cellItems.id, duration: this.cellItems.duration, - spec_id: this.cellItems.spec_id, + spec_id: this.specificationPop.id, duration_method: this.cellItems.duration_method, is_subscribe: Number(this.cellItems.is_subscribe), }; diff --git a/src/pages/service_shop/shop_car_apply.vue b/src/pages/service_shop/shop_car_apply.vue index 44a03a1..c0e0c34 100644 --- a/src/pages/service_shop/shop_car_apply.vue +++ b/src/pages/service_shop/shop_car_apply.vue @@ -163,7 +163,7 @@ export default { this.service_arr[0]["size"] ="应用镜像部署权限:"+data.price+"金币/月"; this.service_arr[0]["applytype"] = "申请方式:" + (app_data.duration_unit == 1 ? "月" : "年"); - this.service_arr[0]["num"] = app_data.duration; + this.service_arr[0]["num"] = `${app_data.duration}个月`; this.service_arr[0]["count"] = app_data.duration*parseFloat(data.price)+'金币'; this.service_arr[0]["isMg"] = false; this.service_arr[0]["isapp"] = true; @@ -183,7 +183,7 @@ export default { //服务 this.post_arr = [data]; this.post_arr[0].service_id = parseInt(service_data.service_id); - this.post_arr[0].spec_id = parseInt(service_data.spec_id); + this.post_arr[0].spec_id = parseInt(service_data.spcs_id); this.post_arr[0].duration_method = parseInt( service_data.duration_unit ); @@ -203,20 +203,22 @@ export default { this.service_arr[0]["size"] = ""; this.service_arr[0]["count"] = ""; data.request_spcs_info.forEach((el) => { - if (service_data.spec_id == el.id) { + if (service_data.spcs_id == el.id) { let size = ""; - + let count = ""; if (el.spcs_type==1) { - size = `${el.money}金币/${el.spcs_count}次` + size = `计次收费:${el.money}金币/${el.spcs_count}次`; this.service_arr[0]["num"] = "不限时长" + count = el.money; } else { - size = `${el.money}金币/${el.duration_unit == 1 ? "月" : "年"}` + size = `${el.money}金币/${el.duration_unit == 1 ? "月" : "年"}`; this.service_arr[0]["num"] = service_data.duration; + count = service_data.duration*el.money; } this.service_arr[0]["size"] = size; - this.service_arr[0]["count"] = service_data.duration*el.money+'金币'; - this.all_cost = service_data.duration*el.money + this.service_arr[0]["count"] = count+'金币'; + this.all_cost = count; } }); this.service_arr[0]["applytype"] = @@ -378,7 +380,7 @@ export default { this.service_arr[l]["size"] ="应用镜像部署权限:"+e.application.price+"金币/月"; this.service_arr[l]["applytype"] = "申请方式:" + (e.duration_method == 1 ? "月" : "年"); - this.service_arr[l]["num"] = e.duration; + this.service_arr[l]["num"] = `${e.duration}${e.duration_unit == 1 ? "个月" : "年"}`; this.service_arr[l]["count"] = e.duration*parseFloat(e.application.price)+'金币'; this.service_arr[l]["isMg"] = false; this.service_arr[l]["isapp"] = true; @@ -402,7 +404,7 @@ export default { let spcs_type_2 = e.service.request_spcs_info.spcs_type_2 || []; spcs_type_1.forEach((el,ind) => { if (e.spec_id == el.id) { - this.service_arr[l]["size"] = `时长收费:${el.money}金币/${el.spcs_count}次 * ${e.duration}`; + this.service_arr[l]["size"] = `计次收费:${el.money}金币/${el.spcs_count}次`; this.service_arr[l]["num"] = "不限时长"; this.service_arr[l]["count"] = e.duration*el.money+'金币'; temp_cost = this.floatAdd(temp_cost, e.duration*el.money); @@ -410,8 +412,8 @@ 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; + 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]["count"] = e.duration*el.money+'金币'; temp_cost = this.floatAdd(temp_cost, e.duration*el.money); } -- 2.26.0