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

Merge branch 'dev'

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