fix: issues
This commit is contained in:
@@ -44,9 +44,10 @@ export default defineComponent({
|
||||
const day = date.getUTCDate();
|
||||
const hour = date.getUTCHours();
|
||||
const minute = date.getUTCMinutes();
|
||||
const second = date.getUTCSeconds();
|
||||
|
||||
// 按照要求格式输出
|
||||
const formattedTime = `${year}年${month}月${day}日 ${hour}时${minute}分`;
|
||||
const formattedTime = `${year}年${month}月${day}日 ${hour}时${minute}分${second}秒`;
|
||||
return formattedTime;
|
||||
}
|
||||
|
||||
|
||||
@@ -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