diff --git a/src/components/service-info/app-info.vue b/src/components/service-info/app-info.vue
index 28f1d7ae0d95e7f34e06958f0e6df6c7c506f68a..21eac76df39edf7bc98d9d09b62eeffbbf3a382e 100644
--- a/src/components/service-info/app-info.vue
+++ b/src/components/service-info/app-info.vue
@@ -37,27 +37,20 @@
价 格:
- {{ specification && specification.single_money ? specification.single_money * duration : 0 }}
+ {{ data.price * duration }}
金币
月售:
-
{{ data.mount_count }} 笔
+
{{ data.sale }} 笔

-
{{ data.scoreDetail.avgScore }}
+
{{ data.star }}
@@ -273,6 +266,10 @@ export default {
.commodity_information > .btn_container > .el-input-number {
margin: 0 20px 15px 0;
}
+.btn_container_ddaw {
+ line-height: 40px;
+ margin-left: 5px;
+}
.commodity_action {
margin-top: 60px;
text-align: right;
diff --git a/src/components/service-info/service-info.vue b/src/components/service-info/service-info.vue
index 9ce68e1dd251e459ae2201b867d231edbfca83ba..0c95d4a5ef04095202f36398134a8ab4b271f9e5 100644
--- a/src/components/service-info/service-info.vue
+++ b/src/components/service-info/service-info.vue
@@ -64,45 +64,59 @@
价 格:
- {{ specification && specification.single_money ? specification.single_money : 0 }}
+ {{
+ specification && specification.money
+ ? specification.money * (showTime ? duration : 1)
+ : 0
+ }}
金币
- 月售:
{{ data.mount_count }} 笔 {{ data.month_sale }} 笔
{{ data.scoreDetail.avgScore }}
@@ -122,8 +136,8 @@
v-model="duration"
:min="1"
:disabled="actionDisabled"
- >月
+ >
+ 月
不限时长
@@ -177,25 +191,12 @@ export default {
showTime: false,
}),
computed: {
- specifications() {
- let specifications = (this.data.serviceRequestSpcs || []).filter(
- (item) => item.type == this.type || item.type == 3
- );
-
- return specifications;
- },
actionDisabled() {
- return this.specifications.length == 0;
- },
- },
- watch: {
- specifications: {
- handler() {
- this.specification = this.specifications[0];
- },
- deep: true,
+ let a = this.data.serviceRequestSpcs;
+ return a.spcs_type_1.length == 0 && a.spcs_type_2.length == 0;
},
},
+ watch: {},
methods: {
dateTransform(datestr = "") {
return helper.dateStringTransform(datestr);
@@ -210,9 +211,6 @@ export default {
},
changeType({ value }) {
this.type = value;
- if (this.specifications.length > 0) {
- this.specification = this.specifications[0];
- }
},
addToCart() {
// console.log("addToCart");
@@ -296,8 +294,10 @@ export default {
}
// 初始化规格
- if (this.specifications.length > 0) {
- this.specification = this.specifications[0];
+ if (this.data.serviceRequestSpcs.spcs_type_1.length > 0) {
+ this.specification = this.data.serviceRequestSpcs.spcs_type_1[0];
+ } else if (this.data.serviceRequestSpcs.spcs_type_2.length > 0) {
+ this.specification = this.data.serviceRequestSpcs.spcs_type_2[0];
}
},
};
diff --git a/src/components/shop-car-apply/apply_service_state.vue b/src/components/shop-car-apply/apply_service_state.vue
index 4cd3288fdec39ac2c7f21a2c21105a91f08ab4a3..cae3248ac23ecc733d97371c99a437e34977cef5 100644
--- a/src/components/shop-car-apply/apply_service_state.vue
+++ b/src/components/shop-car-apply/apply_service_state.vue
@@ -37,10 +37,10 @@
-
{{ data.size }}
-
{{ data.applytype }}
+
计次收费:200金币/1000次
- {{ data.num }}
+ 22222{{ data.num }}
+ 22222{{ data.num }}
服务信息
规格
- 数量
+ 购买时长
+ 小计
操作
@@ -67,13 +68,15 @@ export default {
font-weight: bold;
}
.list_title span:nth-of-type(1){
- margin-right: 460px;
+ margin-right: 420px;
}
.list_title span:nth-of-type(2){
- margin-right: 315px;
+ margin-right: 165px;
}
.list_title span:nth-of-type(3){
- margin-right: 155px;
+ margin-right: 112px;
+}
+.list_title span:nth-of-type(4){
+ margin-right: 130px;
}
-
diff --git a/src/components/shop-cloud/shop-cloud.vue b/src/components/shop-cloud/shop-cloud.vue
index 03f2c87bbaa275966e98e815e2b9c1df5d8aa9bd..f5943b86b194ed99bb3c487f77aebcfed9c94a2d 100644
--- a/src/components/shop-cloud/shop-cloud.vue
+++ b/src/components/shop-cloud/shop-cloud.vue
@@ -1047,7 +1047,9 @@ export default {
getSumCoin() {
let sumCM = 0;
let sumDisk = 0;
+ let a_deductions = 0;
if (this.activeName == "0") {
+ a_deductions = this.deductions;
if (this.formNew.cpu == "8") {
if (this.formNew.memory == "16") {
sumCM += 10880;
@@ -1094,6 +1096,7 @@ export default {
this.formNew.appDuration >= 1 ? this.formNew.appDuration : 0
}个月`;
} else if (this.activeName == "1") {
+ a_deductions = this.deductions;
if (this.formOld.cpu == "8") {
if (this.formOld.memory == "16") {
sumCM += 10880;
@@ -1140,7 +1143,9 @@ export default {
this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0
}个月`;
}
- return sumCM + sumDisk;
+ this.amounts_payable = sumCM + sumDisk;
+ this.total_money = sumCM + sumDisk - a_deductions;
+ return this.total_money;
},
},
data() {
@@ -1170,6 +1175,11 @@ export default {
}
};
return {
+ total_money: 0,
+ disk_single_money: 0,
+ eci_single_money: 0,
+ amounts_payable: 0,
+ deductions: 0,
helper,
form: {
department_name: "",
@@ -1490,6 +1500,19 @@ export default {
this.formOld.apply_file = val[0].url;
},
handleChange() {},
+ getSpecifications() {
+ this.$api.serviceShop.getSpecifications().then((response) => {
+ if (response.data.success == 1) {
+ this.amounts_payable = 1000;
+ this.amounts_payable = 1000;
+ } else {
+ this.$message({
+ message: "获取资源规格失败,请刷新网页",
+ type: "error",
+ });
+ }
+ });
+ },
getForm(val) {
if (val !== "") {
let paramsOld = this.workSpaceOptions[val];
@@ -1542,6 +1565,7 @@ export default {
sum: "2000金币",
},
];
+ this.deductions = 20000;
} else {
this.formShow = false;
}
@@ -1627,6 +1651,12 @@ export default {
store_type: this.formNew.store_type,
},
],
+ payment: {
+ total_money: this.total_money,
+ disk_single_money: this.disk_single_money,
+ eci_single_money: this.eci_single_money,
+ amounts_payable: this.amounts_payable,
+ },
};
this.$api.serviceShop.applicationCloud(query).then((response) => {
if (response.data.success == 1) {
diff --git a/src/components/shopping-cart/shopping-cart-cell.vue b/src/components/shopping-cart/shopping-cart-cell.vue
index 51e06e9e5c6848f30d7b18b84acb2b3d0d9ea757..1b3268fd8915312ea92a271245535b1278dbde94 100644
--- a/src/components/shopping-cart/shopping-cart-cell.vue
+++ b/src/components/shopping-cart/shopping-cart-cell.vue
@@ -2,43 +2,74 @@
-
-
-
-
-
-
+
不限时长
+
+
+
200000000金币
订阅该服务
+ >
+ 订阅该服务
+
删除
diff --git a/src/components/shopping-cart/shopping-cart-com.vue b/src/components/shopping-cart/shopping-cart-com.vue
index 7cd4832da2f216438bfe467718cba73de53d4db6..fad1a9e96e60489a0c466631682289395c633def 100644
--- a/src/components/shopping-cart/shopping-cart-com.vue
+++ b/src/components/shopping-cart/shopping-cart-com.vue
@@ -8,10 +8,10 @@
>全选
-
服务信息
+
服务信息
规格
购买时长
-
小计
+
小计
操作
@@ -58,8 +58,24 @@
>
- 共 {{ list.length }} 项服务,已选择 {{ getNum }} 项,共
- {{ getSumCoin }} 金币
+
+
+
+ 余额不足,请联系超级管理员进行充值
+
+ 费用总计:
+ {{ getSumCoin }}
+
+ 金币
+
+
+
+ 共 {{ list.length }} 项服务,已选择
+ {{ getNum }} 项
+ 账户余额:20,000 金币
+
+
+
{
if (item) {
- sum += 10;
+ sum += item.total_money;
}
});
return sum;
@@ -253,7 +269,7 @@ export default {
font-weight: 500;
color: #58617a;
}
-.shopping_cart_options_num span {
+.dwa_djf {
color: #e56600;
}
.shopping_cart_options_cell_btn {
@@ -279,6 +295,52 @@ export default {
.shopping_list_page {
padding: 10px 20px 0;
}
+.fyzj_item {
+ position: relative;
+}
+.fyzj {
+ color: #242c43;
+ font-size: 18px;
+ margin-right: 10px;
+ text-align: right;
+ position: relative;
+ top: 8px;
+ line-height: 26px;
+}
+.fyzj_p {
+ margin-bottom: 6px;
+}
+.fyzj_span {
+ color: #e56600;
+ font-size: 24px;
+ font-weight: bold;
+}
+.fyzj_qian {
+ color: #e56600;
+ font-size: 14px;
+}
+.ckfymx {
+ color: #58617a;
+ font-size: 14px;
+}
+.ckfymx_a {
+ color: #58617a;
+}
+.ckfymx_qian {
+ display: inline-block;
+ margin-left: 20px;
+ position: relative;
+ color: #a9aec0;
+}
+.ckfymx_qian::after {
+ content: "";
+ position: absolute;
+ width: 1px;
+ height: 16px;
+ background: #bcc1d0;
+ left: -10px;
+ top: 2px;
+}
diff --git a/src/pages/service_shop/sjfwDetail.vue b/src/pages/service_shop/sjfwDetail.vue
index 3039b841d0aa6e3b1f7e36650a8d274ed941d461..87667b964afa4afe1967116ead6f541456e16cc5 100644
--- a/src/pages/service_shop/sjfwDetail.vue
+++ b/src/pages/service_shop/sjfwDetail.vue
@@ -14,7 +14,6 @@
({
baseInfo: null,
detailData: null,
- specificationData: null,
providerData: null,
commentsData: null,
}),
@@ -56,18 +54,6 @@ export default {
})
.then(({ data }) => {
let datas = data.data;
- let specificationData =
- (datas.serviceRequestSpcs &&
- datas.serviceRequestSpcs.map((item) => ({
- id: item.id,
- type: item.type,
- pv: item.pv,
- count: item.count,
- name: `访问次数:${item.pv}次/日 访问量:${item.count}次/日`,
- descript: item.des,
- }))) ||
- [];
-
this.baseInfo = {
service_id: this.id,
app_id: 0,
@@ -87,7 +73,7 @@ export default {
datas.data_service_type3_name,
],
descript: datas.descript,
- serviceRequestSpcs: specificationData,
+ serviceRequestSpcs: datas.serviceRequestSpcs,
scoreDetail: datas.scoreDetail,
};
@@ -185,7 +171,6 @@ export default {
},
},
];
- this.specificationData = specificationData;
this.providerData = {
organization_name: datas.organization_name,
picture_path: datas.organization_picture,
diff --git a/src/pages/service_shop/yysdDetail.vue b/src/pages/service_shop/yysdDetail.vue
index c33b2378214a592f10a1f50d186c8bc209486fe9..1e8abbb6db4ff5d568bf38fb225b04c955eb845a 100644
--- a/src/pages/service_shop/yysdDetail.vue
+++ b/src/pages/service_shop/yysdDetail.vue
@@ -55,9 +55,12 @@ export default {
},
})
.then(({ data }) => {
- this.baseInfo = data.data;
+ this.$api.serviceShop.getExtendedInfo({ id: this.id }).then((response) => {
+ this.baseInfo = data.data;
+ this.baseInfo = Object.assign(this.baseInfo, response.data.data);
+ });
})
- .catch(function(error) {
+ .catch(function (error) {
console.log(error);
});
@@ -100,7 +103,7 @@ export default {
);
this.detailData = detailData;
})
- .catch(function(error) {
+ .catch(function (error) {
console.log(error);
});
@@ -114,7 +117,7 @@ export default {
phone: data.data.phone,
};
})
- .catch(function(error) {
+ .catch(function (error) {
console.log(error);
});
},
diff --git a/src/request/api/service-shop.js b/src/request/api/service-shop.js
index 5919135c261acb175123fbf9ad98ecc12e2f444f..946e3ab0e79b098b958687a61fac60e06dfa2481 100644
--- a/src/request/api/service-shop.js
+++ b/src/request/api/service-shop.js
@@ -46,6 +46,9 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource=
checkNameSpaceCouldUse(params) {
return axios.get(`/apaas/service/v3/resource/apply/checkNs?namespace=${params.id}`)
},
+ getSpecifications() {
+ return axios.get(``)
+ },
// shopping cart
addShoppingCart(params) {
@@ -77,7 +80,12 @@ businessArea=${params.businessArea}&developable=${params.developable}&orgSource=
},
getGeneralOverview() {
return axios.get(`/apaas/service/v3/statistics/other/index`);
- }
+ },
+
+ // app
+ getExtendedInfo(params) {
+ return axios.get(`/apaas/hubApi/market/extendedInfo?id=${params.id}`);
+ },
}
export default serviceShop;