Commit 9a208bd9 authored by 刘殿昕's avatar 刘殿昕

修复bug

parent 49983aa4
...@@ -639,7 +639,7 @@ ...@@ -639,7 +639,7 @@
<div class="btn_footer fyzj_item"> <div class="btn_footer fyzj_item">
<div class="fyzj"> <div class="fyzj">
<p class="fyzj_p"> <p class="fyzj_p">
<span v-if="getSumCoin > userInfo.account_balance" class="yebz"> <span v-if="getSumCoin > user_info.account_balance" class="yebz">
余额不足,请联系超级管理员进行充值 余额不足,请联系超级管理员进行充值
</span> </span>
费用总计:<span class="fyzj_span"> 费用总计:<span class="fyzj_span">
...@@ -652,15 +652,15 @@ ...@@ -652,15 +652,15 @@
查看费用明细 查看费用明细
</span> </span>
<span class="ckfymx_qian" <span class="ckfymx_qian"
>账户余额:{{ userInfo.account_balance }} 金币</span >账户余额:{{ user_info.account_balance }} 金币</span
> >
</p> </p>
</div> </div>
<el-button <el-button
:class=" :class="
getSumCoin <= userInfo.account_balance ? 'submit' : 'nosubmit' getSumCoin <= user_info.account_balance ? 'submit' : 'nosubmit'
" "
:disabled="getSumCoin > userInfo.account_balance" :disabled="getSumCoin > user_info.account_balance"
@click="submitApp" @click="submitApp"
> >
提交申请 提交申请
...@@ -969,7 +969,7 @@ ...@@ -969,7 +969,7 @@
</div> </div>
<p class="fyzj_2"> <p class="fyzj_2">
账户余额:<span class="fyzj_2_num" 账户余额:<span class="fyzj_2_num"
>{{ userInfo.account_balance }} 金币</span >{{ user_info.account_balance }} 金币</span
> >
</p> </p>
</div> </div>
...@@ -1037,7 +1037,6 @@ import TableUm from "@/components/table/table-um"; ...@@ -1037,7 +1037,6 @@ import TableUm from "@/components/table/table-um";
import InfoList from "@/components/infoList"; import InfoList from "@/components/infoList";
import ApassDialog from "@/components/apass-dialog"; import ApassDialog from "@/components/apass-dialog";
import helper from "@/services/helper.js"; import helper from "@/services/helper.js";
import { mapState } from "vuex";
export default { export default {
components: { components: {
...@@ -1178,7 +1177,6 @@ export default { ...@@ -1178,7 +1177,6 @@ export default {
// this.total_money = sumCM + sumDisk - a_deductions; // this.total_money = sumCM + sumDisk - a_deductions;
return this.amounts_payable; return this.amounts_payable;
}, },
...mapState(["userInfo"]),
}, },
data() { data() {
var checkName = (rule, value, callback) => { var checkName = (rule, value, callback) => {
...@@ -1476,14 +1474,23 @@ export default { ...@@ -1476,14 +1474,23 @@ export default {
], ],
cpu_memory: [], cpu_memory: [],
hard_disk: [], hard_disk: [],
user_info: {},
}; };
}, },
mounted() { mounted() {
this.getUser(); this.getUser();
this.getNameSpaceList(); this.getNameSpaceList();
this.getSpecifications(); this.getSpecifications();
this.getUserCoins();
}, },
methods: { methods: {
getUserCoins() {
this.$api.user.getUserCoins().then((response) => {
if (response.data.success == 1) {
this.user_info = response.data.data;
}
});
},
getQueryId() { getQueryId() {
if (this.$route.query.namespace && this.$route.query.namespace != "") { if (this.$route.query.namespace && this.$route.query.namespace != "") {
this.activeName = "1"; this.activeName = "1";
...@@ -1600,7 +1607,6 @@ export default { ...@@ -1600,7 +1607,6 @@ export default {
sum: "2000金币", sum: "2000金币",
}, },
]; ];
this.deductions = this.userInfo.account_balance;
} else { } else {
this.formShow = false; this.formShow = false;
} }
......
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
<el-col :span="15" class="shopping_cart_options_num"> <el-col :span="15" class="shopping_cart_options_num">
<div class="fyzj"> <div class="fyzj">
<p class="fyzj_p"> <p class="fyzj_p">
<span v-if="getSumCoin > userInfo.account_balance" class="yebz"> <span v-if="getSumCoin > user_info.account_balance" class="yebz">
余额不足,请联系超级管理员进行充值 余额不足,请联系超级管理员进行充值
</span> </span>
费用总计:<span class="fyzj_span"> 费用总计:<span class="fyzj_span">
...@@ -73,7 +73,7 @@ ...@@ -73,7 +73,7 @@
{{ list.length }} 项服务,已选择 {{ list.length }} 项服务,已选择
<span class="dwa_djf">{{ getNum }}</span> <span class="dwa_djf">{{ getNum }}</span>
<span class="ckfymx_qian" <span class="ckfymx_qian"
>账户余额:{{ userInfo.account_balance }} 金币</span >账户余额:{{ user_info.account_balance }} 金币</span
> >
</p> </p>
</div> </div>
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
</el-col> </el-col>
<el-col :span="4" class="shopping_cart_options_cell"> <el-col :span="4" class="shopping_cart_options_cell">
<el-button <el-button
v-if="getNum != 0 && getSumCoin <= userInfo.account_balance" v-if="getNum != 0 && getSumCoin <= user_info.account_balance"
@click="oneClickApplication" @click="oneClickApplication"
class="shopping_cart_options_cell_btn_act" class="shopping_cart_options_cell_btn_act"
>一键申请</el-button >一键申请</el-button
...@@ -101,7 +101,6 @@ ...@@ -101,7 +101,6 @@
<script> <script>
import ShoppingCartList from "@/components/shopping-cart/shopping-cart-list"; import ShoppingCartList from "@/components/shopping-cart/shopping-cart-list";
import { mapState } from "vuex";
export default { export default {
components: { components: {
...@@ -114,9 +113,11 @@ export default { ...@@ -114,9 +113,11 @@ export default {
checkListIn: [], checkListIn: [],
list: [], list: [],
listIn: [], listIn: [],
user_info: {},
}), }),
mounted() { mounted() {
this.getList(); this.getList();
this.getUserCoins();
}, },
computed: { computed: {
getNum() { getNum() {
...@@ -143,7 +144,6 @@ export default { ...@@ -143,7 +144,6 @@ export default {
getCartState() { getCartState() {
return this.$store.state.cartState; return this.$store.state.cartState;
}, },
...mapState(["userInfo"]),
}, },
watch: { watch: {
getCartState(newVal) { getCartState(newVal) {
...@@ -151,6 +151,13 @@ export default { ...@@ -151,6 +151,13 @@ export default {
}, },
}, },
methods: { methods: {
getUserCoins() {
this.$api.user.getUserCoins().then((response) => {
if (response.data.success == 1) {
this.user_info = response.data.data;
}
});
},
getList() { getList() {
this.$api.serviceShop.getShoppingCart().then((response) => { this.$api.serviceShop.getShoppingCart().then((response) => {
if (response.data.success == "1") { if (response.data.success == "1") {
......
...@@ -68,7 +68,7 @@ ...@@ -68,7 +68,7 @@
<div class="qa_cell_in"> <div class="qa_cell_in">
<div :class="activeName == 2 ? 'qa_is_del' : 'qa_init'"> <div :class="activeName == 2 ? 'qa_is_del' : 'qa_init'">
<p <p
v-if="activeName == 1" v-if="item.answer != ''"
class="cell_answer" class="cell_answer"
v-html="item.answer" v-html="item.answer"
></p> ></p>
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
删除时间:{{ helper.dateStringTransform(item.deleted_time) }} 删除时间:{{ helper.dateStringTransform(item.deleted_time) }}
</span> </span>
<span>删除人:{{ item.delete_user }}</span> <span>删除人:{{ item.delete_user }}</span>
<span>删除理由:{{ item.reason }}</span> <span>删除理由:{{ item.delete_reason }}</span>
</p> </p>
<p v-else class="cell_other"> <p v-else class="cell_other">
<span>{{ helper.dateStringTransform(item.created) }}</span> <span>{{ helper.dateStringTransform(item.created) }}</span>
...@@ -329,6 +329,7 @@ export default { ...@@ -329,6 +329,7 @@ export default {
message: "删除成功", message: "删除成功",
type: "success", type: "success",
}); });
this.refreshData();
} }
}); });
}, },
...@@ -341,6 +342,7 @@ export default { ...@@ -341,6 +342,7 @@ export default {
message: "删除成功", message: "删除成功",
type: "success", type: "success",
}); });
this.refreshData();
} }
}); });
}, },
......
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