diff --git a/src/components/shop-cloud/shop-cloud.vue b/src/components/shop-cloud/shop-cloud.vue index b3dfa888a1f2e6c3f81cffd6a131e915a2f4425c..6cb5b27d4b8c0168cfe0165a12d2ff24a33ce3bc 100644 --- a/src/components/shop-cloud/shop-cloud.vue +++ b/src/components/shop-cloud/shop-cloud.vue @@ -639,7 +639,7 @@
账户余额:{{ userInfo.account_balance }} 金币{{ user_info.account_balance }} 金币
@@ -1037,7 +1037,6 @@ import TableUm from "@/components/table/table-um"; import InfoList from "@/components/infoList"; import ApassDialog from "@/components/apass-dialog"; import helper from "@/services/helper.js"; -import { mapState } from "vuex"; export default { components: { @@ -1178,7 +1177,6 @@ export default { // this.total_money = sumCM + sumDisk - a_deductions; return this.amounts_payable; }, - ...mapState(["userInfo"]), }, data() { var checkName = (rule, value, callback) => { @@ -1476,14 +1474,23 @@ export default { ], cpu_memory: [], hard_disk: [], + user_info: {}, }; }, mounted() { this.getUser(); this.getNameSpaceList(); this.getSpecifications(); + this.getUserCoins(); }, methods: { + getUserCoins() { + this.$api.user.getUserCoins().then((response) => { + if (response.data.success == 1) { + this.user_info = response.data.data; + } + }); + }, getQueryId() { if (this.$route.query.namespace && this.$route.query.namespace != "") { this.activeName = "1"; @@ -1600,7 +1607,6 @@ export default { sum: "2000金币", }, ]; - this.deductions = this.userInfo.account_balance; } else { this.formShow = false; } diff --git a/src/components/shopping-cart/shopping-cart-com.vue b/src/components/shopping-cart/shopping-cart-com.vue index 2d3148c5b6d7e7a2d049570eedeb148a0c2f355e..a8edb7d0207b846a529ad401dd86dd07293bf56e 100644 --- a/src/components/shopping-cart/shopping-cart-com.vue +++ b/src/components/shopping-cart/shopping-cart-com.vue @@ -60,7 +60,7 @@- + 余额不足,请联系超级管理员进行充值 费用总计: @@ -73,7 +73,7 @@ 共 {{ list.length }} 项服务,已选择 {{ getNum }} 项 账户余额:{{ userInfo.account_balance }} 金币账户余额:{{ user_info.account_balance }} 金币
{{ helper.dateStringTransform(item.created) }} @@ -329,6 +329,7 @@ export default { message: "删除成功", type: "success", }); + this.refreshData(); } }); }, @@ -341,6 +342,7 @@ export default { message: "删除成功", type: "success", }); + this.refreshData(); } }); },