fix: issues
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
<charge-code v-if="user.is_admin === true" />
|
||||
|
||||
<balance-history />
|
||||
<balance-history ref="balanceHistory" />
|
||||
|
||||
|
||||
</template>
|
||||
@@ -24,9 +24,11 @@ import BalanceHistory from "@/components/BalanceHistory.vue";
|
||||
import ChargeCode from "@/components/ChargeCode.vue";
|
||||
import ChargeNoticeBar from "@/components/ChargeNoticeBar.vue";
|
||||
import request from "@/utils/request";
|
||||
import { ref } from 'vue';
|
||||
|
||||
const user = ref({});
|
||||
const chargeCode = ref("")
|
||||
const balanceHistory = ref(null);
|
||||
|
||||
const loadUserInfo = () => {
|
||||
request.get("/users/info").then((res) => {
|
||||
@@ -55,6 +57,8 @@ const confirmCharge = () => {
|
||||
.patch(`/users/charge/${chargeCode.value}`)
|
||||
.then(() => {
|
||||
loadUserInfo();
|
||||
chargeCode.value = "";
|
||||
balanceHistory.value.loadHistories(); // Refresh BalanceHistory
|
||||
showSuccessToast('充值成功');
|
||||
})
|
||||
.catch((err) => {
|
||||
|
||||
Reference in New Issue
Block a user