Commit ec84968d authored by 刘殿昕's avatar 刘殿昕

Merge branch 'dev'

parents d1cd326b dca59da1
...@@ -578,8 +578,8 @@ ...@@ -578,8 +578,8 @@
<el-input-number <el-input-number
v-model="formOld.appDuration" v-model="formOld.appDuration"
controls-position="right" controls-position="right"
:min="1" :min="0"
:max="1000" :max="10000"
></el-input-number> ></el-input-number>
<div class="input_right"></div> <div class="input_right"></div>
</el-form-item> </el-form-item>
...@@ -1361,7 +1361,7 @@ export default { ...@@ -1361,7 +1361,7 @@ export default {
perCPU: undefined, perCPU: undefined,
perRAMs: undefined, perRAMs: undefined,
perRAM: undefined, perRAM: undefined,
appDuration: 1, appDuration: 0,
durType: 1, durType: 1,
apply_file: "", apply_file: "",
apply_file_name: "", apply_file_name: "",
...@@ -1530,23 +1530,23 @@ export default { ...@@ -1530,23 +1530,23 @@ export default {
this.formOld.namespace = paramsOld.namespace; this.formOld.namespace = paramsOld.namespace;
this.formOld.workplace = paramsOld.workplace; this.formOld.workplace = paramsOld.workplace;
this.formOld.workplacedesc = paramsOld.workplacedesc; this.formOld.workplacedesc = paramsOld.workplacedesc;
this.formOld.cpu = paramsOld.cpu; // this.formOld.cpu = paramsOld.cpu;
this.formOld.memory = paramsOld.memory; // this.formOld.memory = paramsOld.memory;
this.formOld.containerGroup = paramsOld.containers; // this.formOld.containerGroup = paramsOld.containers;
this.specArr[0].val = paramsOld.cpu; this.specArr[0].val = paramsOld.cpu;
this.specArr[1].val = paramsOld.memory; this.specArr[1].val = paramsOld.memory;
this.specArr[2].val = paramsOld.containers; this.specArr[2].val = paramsOld.containers;
this.formOld.dataDisk = ""; // this.formOld.dataDisk = "";
this.formOld.perDataDisk = ""; // this.formOld.perDataDisk = "";
this.formOld.perCPUs = paramsOld.one_cpu_max; // this.formOld.perCPUs = paramsOld.one_cpu_max;
this.formOld.perCPU = paramsOld.one_cpu_min; // this.formOld.perCPU = paramsOld.one_cpu_min;
this.formOld.perRAMs = paramsOld.one_memory_max; // this.formOld.perRAMs = paramsOld.one_memory_max;
this.formOld.perRAM = paramsOld.one_memory_min; // this.formOld.perRAM = paramsOld.one_memory_min;
this.rqzArr[0].max = paramsOld.one_cpu_max; this.rqzArr[0].max = paramsOld.one_cpu_max;
this.rqzArr[0].default = paramsOld.one_cpu_min; this.rqzArr[0].default = paramsOld.one_cpu_min;
this.rqzArr[1].max = paramsOld.one_memory_max; this.rqzArr[1].max = paramsOld.one_memory_max;
this.rqzArr[1].default = paramsOld.one_memory_min; this.rqzArr[1].default = paramsOld.one_memory_min;
this.formOld.store_type = paramsOld.store_type; // this.formOld.store_type = paramsOld.store_type;
this.dataDiskList = paramsOld.disk_list || []; this.dataDiskList = paramsOld.disk_list || [];
this.dataDiskList.forEach((item, index) => { this.dataDiskList.forEach((item, index) => {
item.name = `磁盘${index + 1}`; item.name = `磁盘${index + 1}`;
...@@ -1588,23 +1588,23 @@ export default { ...@@ -1588,23 +1588,23 @@ export default {
this.formOld.namespace = paramsOld.namespace; this.formOld.namespace = paramsOld.namespace;
this.formOld.workplace = paramsOld.workplace; this.formOld.workplace = paramsOld.workplace;
this.formOld.workplacedesc = paramsOld.workplacedesc; this.formOld.workplacedesc = paramsOld.workplacedesc;
this.formOld.cpu = paramsOld.cpu; // this.formOld.cpu = paramsOld.cpu;
this.formOld.memory = paramsOld.memory; // this.formOld.memory = paramsOld.memory;
this.formOld.containerGroup = paramsOld.containers; // this.formOld.containerGroup = paramsOld.containers;
this.specArr[0].val = paramsOld.cpu; this.specArr[0].val = paramsOld.cpu;
this.specArr[1].val = paramsOld.memory; this.specArr[1].val = paramsOld.memory;
this.specArr[2].val = paramsOld.containers; this.specArr[2].val = paramsOld.containers;
this.formOld.dataDisk = ""; // this.formOld.dataDisk = "";
this.formOld.perDataDisk = ""; // this.formOld.perDataDisk = "";
this.formOld.perCPUs = paramsOld.one_cpu_max; // this.formOld.perCPUs = paramsOld.one_cpu_max;
this.formOld.perCPU = paramsOld.one_cpu_min; // this.formOld.perCPU = paramsOld.one_cpu_min;
this.formOld.perRAMs = paramsOld.one_memory_max; // this.formOld.perRAMs = paramsOld.one_memory_max;
this.formOld.perRAM = paramsOld.one_memory_min; // this.formOld.perRAM = paramsOld.one_memory_min;
this.rqzArr[0].max = paramsOld.one_cpu_max; this.rqzArr[0].max = paramsOld.one_cpu_max;
this.rqzArr[0].default = paramsOld.one_cpu_min; this.rqzArr[0].default = paramsOld.one_cpu_min;
this.rqzArr[1].max = paramsOld.one_memory_max; this.rqzArr[1].max = paramsOld.one_memory_max;
this.rqzArr[1].default = paramsOld.one_memory_min; this.rqzArr[1].default = paramsOld.one_memory_min;
this.formOld.store_type = paramsOld.store_type; // this.formOld.store_type = paramsOld.store_type;
this.dataDiskList = paramsOld.disk_list || []; this.dataDiskList = paramsOld.disk_list || [];
this.dataDiskList.forEach((item, index) => { this.dataDiskList.forEach((item, index) => {
item.name = `磁盘${index + 1}`; item.name = `磁盘${index + 1}`;
......
...@@ -369,10 +369,12 @@ export default { ...@@ -369,10 +369,12 @@ export default {
}); });
}, },
updateShoppingCart() { updateShoppingCart() {
let spec_id = this.specificationPop && this.specificationPop.id ? this.specificationPop.id : this.cellItems.spec_id;
console.log(spec_id)
let query = { let query = {
id: this.cellItems.id, id: this.cellItems.id,
duration: this.cellItems.duration, duration: this.cellItems.duration,
spec_id: this.specificationPop.id, spec_id: spec_id,
duration_method: this.cellItems.duration_method, duration_method: this.cellItems.duration_method,
is_subscribe: Number(this.cellItems.is_subscribe), is_subscribe: Number(this.cellItems.is_subscribe),
}; };
......
...@@ -2,7 +2,10 @@ ...@@ -2,7 +2,10 @@
<div class="services_shop-container"> <div class="services_shop-container">
<div class="services_shop-carousel"> <div class="services_shop-carousel">
<el-carousel height="400px" arrow="never"> <el-carousel height="400px" arrow="never">
<el-carousel-item v-for="(banner, index) in banners" :key="'banner_' + index"> <el-carousel-item
v-for="(banner, index) in banners"
:key="'banner_' + index"
>
<img :src="banner.image_url" width="100%" @click="goto(banner.url)" /> <img :src="banner.image_url" width="100%" @click="goto(banner.url)" />
</el-carousel-item> </el-carousel-item>
</el-carousel> </el-carousel>
...@@ -20,7 +23,11 @@ ...@@ -20,7 +23,11 @@
</p> </p>
</div> </div>
</li> </li>
<li class="info_line" :key="'line_' + index" v-if="index + 1 < servicesShopInfo.length"></li> <li
class="info_line"
:key="'line_' + index"
v-if="index + 1 < servicesShopInfo.length"
></li>
</template> </template>
</ul> </ul>
</div> </div>
...@@ -63,45 +70,50 @@ import helper from "@/services/helper"; ...@@ -63,45 +70,50 @@ import helper from "@/services/helper";
export default { export default {
components: { components: {
shopList shopList,
}, },
data: () => ({ data: () => ({
banners: null, banners: [
{ image_url: require("@/assets/imgs/1.jpg") },
{ image_url: require("@/assets/imgs/2.jpg") },
{ image_url: require("@/assets/imgs/3.jpg") },
{ image_url: require("@/assets/imgs/4.jpg") },
],
servicesShopInfo: [ servicesShopInfo: [
{ {
name: "服务总数", name: "服务总数",
value: 0, value: 0,
icon: require("@/assets/imgs/shop_ic_fuwuzs.png") icon: require("@/assets/imgs/shop_ic_fuwuzs.png"),
}, },
{ {
name: "用户总数", name: "用户总数",
value: 0, value: 0,
icon: require("@/assets/imgs/shop_ic_yonghuzs.png") icon: require("@/assets/imgs/shop_ic_yonghuzs.png"),
}, },
{ {
name: "接入机构", name: "接入机构",
value: 0, value: 0,
icon: require("@/assets/imgs/shop_ic_jierujg.png") icon: require("@/assets/imgs/shop_ic_jierujg.png"),
}, },
{ {
name: "应用总数", name: "应用总数",
value: 0, value: 0,
icon: require("@/assets/imgs/shop_ic_jieruxt.png") icon: require("@/assets/imgs/shop_ic_jieruxt.png"),
}, },
{ {
name: "服务请求次数", name: "服务请求次数",
value: 0, value: 0,
icon: require("@/assets/imgs/shop_ic_fuwuqqcs.png") icon: require("@/assets/imgs/shop_ic_fuwuqqcs.png"),
} },
], ],
hot_datas: [], hot_datas: [],
map_datas: [], map_datas: [],
comprehensive_datas: [], comprehensive_datas: [],
helper helper,
}), }),
methods: { methods: {
init(type) { init(type) {
this.$api.serviceShop.getFeaturedList({ type }).then(response => { this.$api.serviceShop.getFeaturedList({ type }).then((response) => {
if (type == "hotdata") { if (type == "hotdata") {
this.hot_datas = response.data.data; this.hot_datas = response.data.data;
} else if (type == "hgmap") { } else if (type == "hgmap") {
...@@ -112,12 +124,17 @@ export default { ...@@ -112,12 +124,17 @@ export default {
}); });
}, },
getBenner() { getBenner() {
this.$api.serviceShop.getBenner().then(response => { this.$api.serviceShop.getBenner().then((response) => {
this.banners = response.data.data; if (response.data.success == 1) {
let arr = response.data.data;
if (arr && arr.length != 0) {
this.banners = response.data.data;
}
}
}); });
}, },
getGeneralOverview() { getGeneralOverview() {
this.$api.serviceShop.getGeneralOverview().then(response => { this.$api.serviceShop.getGeneralOverview().then((response) => {
let data = response.data.data; let data = response.data.data;
this.servicesShopInfo[0].value = data.service_num; this.servicesShopInfo[0].value = data.service_num;
this.servicesShopInfo[1].value = data.person_num; this.servicesShopInfo[1].value = data.person_num;
...@@ -128,7 +145,7 @@ export default { ...@@ -128,7 +145,7 @@ export default {
}, },
goto(page) { goto(page) {
window.location.href = page; window.location.href = page;
} },
}, },
mounted() { mounted() {
this.getBenner(); this.getBenner();
...@@ -136,7 +153,7 @@ export default { ...@@ -136,7 +153,7 @@ export default {
this.init("hgmap"); this.init("hgmap");
this.init("zhapp"); this.init("zhapp");
this.getGeneralOverview(); this.getGeneralOverview();
} },
}; };
</script> </script>
......
...@@ -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)
......
...@@ -1058,7 +1058,10 @@ export default { ...@@ -1058,7 +1058,10 @@ export default {
...mapState(["userInfo"]) ...mapState(["userInfo"])
}, },
created() { created() {
this.manage_arr[this.manage_arr.length - 1].url = cloudServiceRoot; this.$nextTick(() => {
this.manage_arr[this.manage_arr.length - 1].url = cloudServiceRoot;
console.log(this.manage_arr)
})
}, },
mounted() { mounted() {
console.log(this.level); console.log(this.level);
......
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