|
|
@@ -1,17 +1,18 @@
|
|
|
<template>
|
|
|
<div class="game">
|
|
|
- <div class="inner_box" @click="close"></div>
|
|
|
+ <div class="inner_box" @click="closePage"></div>
|
|
|
<!-- 游戏内充值 -->
|
|
|
<GamePayBox
|
|
|
v-if="showGameInner === ''"
|
|
|
@showInnerControl="showInnerControl"
|
|
|
- @close="close"
|
|
|
+ @close="closeGamePay"
|
|
|
/>
|
|
|
|
|
|
<!-- 鸿币充值 -->
|
|
|
<MenuPay
|
|
|
v-if="showGameInner === 'hb'"
|
|
|
@showInnerControl="showInnerControl"
|
|
|
+ @close="close"
|
|
|
/>
|
|
|
|
|
|
<!-- 鸿币支付确认 -->
|
|
|
@@ -33,6 +34,7 @@ import GamePayBox from "@/views/GamePay/GamePayBox"; // 游戏内充值
|
|
|
import MenuPay from "@/components/Menu/MenuPay/MenuPay"; // 鸿币充值
|
|
|
import MenuHbPay from "@/components/Menu/MenuPay/MenuHbPay"; // 鸿币支付确认
|
|
|
import MenuHbDetail from "@/components/Menu/MenuPay/MenuHbDetail"; // 鸿币充值优惠明细
|
|
|
+import { mapState } from "vuex";
|
|
|
export default {
|
|
|
name: "GamePay",
|
|
|
components: {
|
|
|
@@ -47,8 +49,16 @@ export default {
|
|
|
showGameInner: "", // 控制显示哪个组件
|
|
|
};
|
|
|
},
|
|
|
- computed: {},
|
|
|
- watch: {},
|
|
|
+ computed: {
|
|
|
+ ...mapState(["userInfo"]),
|
|
|
+ },
|
|
|
+ watch: {
|
|
|
+ userInfo: {
|
|
|
+ handler: function () {},
|
|
|
+ deep: true,
|
|
|
+ immediate: true,
|
|
|
+ },
|
|
|
+ },
|
|
|
created() {},
|
|
|
mounted() {
|
|
|
this.getFinance();
|
|
|
@@ -64,6 +74,17 @@ export default {
|
|
|
// 1. 展示游戏内充值
|
|
|
this.showInnerControl("");
|
|
|
},
|
|
|
+
|
|
|
+ // 鸿币的返回回调函数
|
|
|
+ closeGamePay() {
|
|
|
+ this.showInnerControl("");
|
|
|
+ this.$utils.closePage(this.userInfo.uid);
|
|
|
+ },
|
|
|
+
|
|
|
+ // 关闭当前支付
|
|
|
+ closePage() {
|
|
|
+ this.$utils.closePage(this.userInfo.uid);
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|