diff --git a/src/components/shop-cloud/shop-cloud.vue b/src/components/shop-cloud/shop-cloud.vue index be21b48159925afcd5cad5df861f191f04d102a6..b3dfa888a1f2e6c3f81cffd6a131e915a2f4425c 100644 --- a/src/components/shop-cloud/shop-cloud.vue +++ b/src/components/shop-cloud/shop-cloud.vue @@ -651,11 +651,15 @@ 查看费用明细 - 账户余额:{{ userInfo.account_balance }} 金币 + 账户余额:{{ userInfo.account_balance }} 金币

@@ -964,7 +968,9 @@

- 账户余额:{{ userInfo.account_balance }} 金币 + 账户余额:{{ userInfo.account_balance }} 金币

@@ -1053,27 +1059,27 @@ export default { a_deductions = this.deductions; if (this.formNew.cpu == "8") { if (this.formNew.memory == "16") { - let priceObj = this.cpu_memory.find(item => { + let priceObj = this.cpu_memory.find((item) => { return item.cpu == 8 && item.memory == 16; - }) - sumCM += priceObj.price; + }); + sumCM += Number(priceObj.price); } else if (this.formNew.memory == "32") { - let priceObj = this.cpu_memory.find(item => { + let priceObj = this.cpu_memory.find((item) => { return item.cpu == 8 && item.memory == 32; - }) - sumCM += priceObj.price; + }); + sumCM += Number(priceObj.price); } } else if (this.formNew.cpu == "16") { if (this.formNew.memory == "32") { - let priceObj = this.cpu_memory.find(item => { + let priceObj = this.cpu_memory.find((item) => { return item.cpu == 16 && item.memory == 32; - }) - sumCM += priceObj.price; + }); + sumCM += Number(priceObj.price); } else if (this.formNew.memory == "64") { - let priceObj = this.cpu_memory.find(item => { + let priceObj = this.cpu_memory.find((item) => { return item.cpu == 16 && item.memory == 64; - }) - sumCM += priceObj.price; + }); + sumCM += Number(priceObj.price); } } if ( @@ -1082,10 +1088,10 @@ export default { this.formNew.appDuration >= 1 ) { sumDisk += - this.formNew.dataDisk * - this.formNew.perDataDisk * - this.formNew.appDuration * - this.hard_disk[0].price; + Number(this.formNew.dataDisk) * + Number(this.formNew.perDataDisk) * + Number(this.formNew.appDuration) * + Number(this.hard_disk[0].price); this.jifeiList1[2] = { name: "数据盘", num: `${this.formNew.dataDisk}个数据盘,每个数据盘${this.formNew.perDataDisk}GB`, @@ -1112,27 +1118,27 @@ export default { a_deductions = this.deductions; if (this.formOld.cpu == "8") { if (this.formOld.memory == "16") { - let priceObj = this.cpu_memory.find(item => { + let priceObj = this.cpu_memory.find((item) => { return item.cpu == 8 && item.memory == 16; - }) - sumCM += priceObj.price; + }); + sumCM += Number(priceObj.price); } else if (this.formOld.memory == "32") { - let priceObj = this.cpu_memory.find(item => { + let priceObj = this.cpu_memory.find((item) => { return item.cpu == 8 && item.memory == 32; - }) - sumCM += priceObj.price; + }); + sumCM += Number(priceObj.price); } } else if (this.formOld.cpu == "16") { if (this.formOld.memory == "32") { - let priceObj = this.cpu_memory.find(item => { + let priceObj = this.cpu_memory.find((item) => { return item.cpu == 16 && item.memory == 32; - }) - sumCM += priceObj.price; + }); + sumCM += Number(priceObj.price); } else if (this.formOld.memory == "64") { - let priceObj = this.cpu_memory.find(item => { + let priceObj = this.cpu_memory.find((item) => { return item.cpu == 16 && item.memory == 64; - }) - sumCM += priceObj.price; + }); + sumCM += Number(priceObj.price); } } if ( @@ -1141,10 +1147,10 @@ export default { this.formOld.appDuration >= 1 ) { sumDisk += - this.formOld.dataDisk * - this.formOld.perDataDisk * - this.formOld.appDuration * - this.hard_disk[0].price; + Number(this.formOld.dataDisk) * + Number(this.formOld.perDataDisk) * + Number(this.formOld.appDuration) * + Number(this.hard_disk[0].price); this.jifeiList1[2] = { name: "数据盘", num: `${this.formOld.dataDisk}个数据盘,每个数据盘${this.formOld.perDataDisk}GB`, @@ -1168,7 +1174,7 @@ export default { this.formOld.appDuration >= 1 ? this.formOld.appDuration : 0 }个月`; } - this.amounts_payable = (sumCM + sumDisk).toFixed(2); + this.amounts_payable = Number((Number(sumCM) + Number(sumDisk)).toFixed(2)); // this.total_money = sumCM + sumDisk - a_deductions; return this.amounts_payable; }, diff --git a/src/components/shopping-cart/shopping-cart-com.vue b/src/components/shopping-cart/shopping-cart-com.vue index 72892923ee31c88fe106147a3dba8eb816910d06..2d3148c5b6d7e7a2d049570eedeb148a0c2f355e 100644 --- a/src/components/shopping-cart/shopping-cart-com.vue +++ b/src/components/shopping-cart/shopping-cart-com.vue @@ -132,9 +132,9 @@ export default { this.checkList.forEach((item, index) => { if (item) { if (this.list[index].service_id != 0) { - sum += (this.list[index].service.spcs_info.money * this.list[index].duration).toFixed(2); + sum += Number((this.list[index].service.spcs_info.money * this.list[index].duration).toFixed(2)); } else { - sum += (this.list[index].application.price * this.list[index].duration).toFixed(2); + sum += Number((this.list[index].application.price * this.list[index].duration).toFixed(2)); } } }); diff --git a/src/pages/user/questions-answers/community.vue b/src/pages/user/questions-answers/community.vue index a08271028ab510634cc6e954efb9773e812fc610..d17b53bdaeb13446af2497fe72f8684a51f56ede 100644 --- a/src/pages/user/questions-answers/community.vue +++ b/src/pages/user/questions-answers/community.vue @@ -51,7 +51,7 @@ >
- +

删除理由:

-

- {{ item.answer }} +

{ if (response.data.success == 1) { this.$message({ @@ -336,6 +335,7 @@ export default { }, delA() { let items = [{ id: this.delItem.id }]; + this.diaDelItem = false; this.$api.user.delAnswers(items).then((response) => { if (response.data.success == 1) { this.$message({