Commit 90f0a096 authored by 刘殿昕's avatar 刘殿昕

duration_unit取消年

parent 818cd38a
...@@ -126,7 +126,10 @@ export default { ...@@ -126,7 +126,10 @@ export default {
getBenner() { getBenner() {
this.$api.serviceShop.getBenner().then((response) => { this.$api.serviceShop.getBenner().then((response) => {
if (response.data.success == 1) { 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;
}
} }
}); });
}, },
......
...@@ -173,8 +173,7 @@ export default { ...@@ -173,8 +173,7 @@ export default {
this.service_arr[0]["auth"] = data.org_name; this.service_arr[0]["auth"] = data.org_name;
this.service_arr[0]["size"] = this.service_arr[0]["size"] =
"应用镜像部署权限:" + data.price + "金币/月"; "应用镜像部署权限:" + data.price + "金币/月";
this.service_arr[0]["applytype"] = 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"] = this.service_arr[0]["count"] =
app_data.duration * parseFloat(data.price) + "金币"; app_data.duration * parseFloat(data.price) + "金币";
...@@ -226,12 +225,8 @@ export default { ...@@ -226,12 +225,8 @@ export default {
objs.num = "不限时长"; objs.num = "不限时长";
count = el.money; count = el.money;
} else { } else {
size = `${el.money}金币/${ size = `${el.money}金币/月`;
el.duration_unit == 1 ? "" : "" objs.num = service_data.duration + "个月";
}`;
objs.num =
service_data.duration +
(el.duration_unit == 1 ? "个月" : "");
count = service_data.duration * el.money; count = service_data.duration * el.money;
} }
objs.size = size; objs.size = size;
...@@ -239,8 +234,7 @@ export default { ...@@ -239,8 +234,7 @@ export default {
this.all_cost = count; this.all_cost = count;
} }
}); });
objs.applytype = objs.applytype = "申请方式:" + "";
"申请方式:" + (service_data.duration_unit == 1 ? "" : "");
objs.isMg = data.openness == 3; objs.isMg = data.openness == 3;
if (data.data_service_type1 != 36) { if (data.data_service_type1 != 36) {
objs.data = JSON.parse(data.res_fields); objs.data = JSON.parse(data.res_fields);
...@@ -400,11 +394,8 @@ export default { ...@@ -400,11 +394,8 @@ export default {
this.service_arr[l]["auth"] = e.application.org_name; this.service_arr[l]["auth"] = e.application.org_name;
this.service_arr[l]["size"] = this.service_arr[l]["size"] =
"应用镜像部署权限:" + e.application.price + "金币/月"; "应用镜像部署权限:" + e.application.price + "金币/月";
this.service_arr[l]["applytype"] = 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"] = this.service_arr[l]["count"] =
e.duration * parseFloat(e.application.price) + "金币"; e.duration * parseFloat(e.application.price) + "金币";
this.service_arr[l]["isMg"] = false; this.service_arr[l]["isMg"] = false;
...@@ -442,19 +433,14 @@ export default { ...@@ -442,19 +433,14 @@ export default {
}); });
spcs_type_2.forEach((el, ind) => { spcs_type_2.forEach((el, ind) => {
if (e.spec_id == el.id) { if (e.spec_id == el.id) {
this.service_arr[l]["size"] = `时长收费:${el.money}金币/${ this.service_arr[l]["size"] = `时长收费:${el.money}金币/月`;
el.duration_unit == 1 ? "" : "" this.service_arr[l]["num"] = `${e.duration}个月`;
}`;
this.service_arr[l]["num"] = `${e.duration}${
el.duration_unit == 1 ? "个月" : ""
}`;
this.service_arr[l]["count"] = e.duration * el.money + "金币"; this.service_arr[l]["count"] = e.duration * el.money + "金币";
temp_cost = this.floatAdd(temp_cost, e.duration * el.money); temp_cost = this.floatAdd(temp_cost, e.duration * el.money);
} }
}); });
this.service_arr[l]["applytype"] = this.service_arr[l]["applytype"] = "申请方式:月";
"申请方式:" + (e.duration_method == 1 ? "" : "");
this.service_arr[l]["isMg"] = e.service.openness == 3; this.service_arr[l]["isMg"] = e.service.openness == 3;
this.service_arr[l]["data"] = e.service.res_fields this.service_arr[l]["data"] = e.service.res_fields
? JSON.parse(e.service.res_fields) ? JSON.parse(e.service.res_fields)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment