From fe688096a46f029f69b88771249370da870aad33 Mon Sep 17 00:00:00 2001 From: yuzhiran Date: Sun, 5 Jul 2026 08:59:02 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20interview=20=E9=A1=B5=E9=9D=A2=2022x=20R?= =?UTF-8?q?eferenceError=20+=20=E5=BC=95=E5=8A=9B=E5=80=BC=E6=98=8E?= =?UTF-8?q?=E7=BB=86=E8=BF=BD=E5=8A=A0=E4=BD=99=E9=A2=9D=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit interview.vue: 上次会话修改时丢失了 timerSeconds/timerInterval 两个 let 声明 (它们在 git 历史里 d8a7872 时本和 onMounted 同段定义),导致页面渲染时 20+ 次 'ReferenceError: timerSeconds is not defined' 刷屏、对话框/计时器 被白屏错误覆盖。补回两行声明即可还原,无其它改动。 user.vue: 引力值明细每行除金额外追加变动后「余额 N」尾列(schema 中 balance 字段已记录,仅前端未展示)。.detail-item-right 容器纵向堆叠金额+小字余额。 --- zhiyin-app/src/pages/interview/interview.vue | 2 ++ zhiyin-app/src/pages/user/user.vue | 13 +++++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/zhiyin-app/src/pages/interview/interview.vue b/zhiyin-app/src/pages/interview/interview.vue index d836cce..c581926 100644 --- a/zhiyin-app/src/pages/interview/interview.vue +++ b/zhiyin-app/src/pages/interview/interview.vue @@ -193,6 +193,8 @@ function initRecorder() { // #endif } +let timerSeconds = 0 +let timerInterval = null let MAX_QUESTIONS = 10 const progressPercent = computed(() => Math.min((answeredCount.value / MAX_QUESTIONS) * 100, 100)) const formatTime = computed(() => { diff --git a/zhiyin-app/src/pages/user/user.vue b/zhiyin-app/src/pages/user/user.vue index 6fe3539..6b22470 100644 --- a/zhiyin-app/src/pages/user/user.vue +++ b/zhiyin-app/src/pages/user/user.vue @@ -172,9 +172,12 @@ {{ tx.description }} {{ formatTime(tx.createdAt) }} - - {{ tx.amount > 0 ? '+' : '' }}{{ tx.amount }} - + + + {{ tx.amount > 0 ? '+' : '' }}{{ tx.amount }} + + 余额 {{ tx.balance }} + @@ -472,7 +475,9 @@ const doLogout = () => { .detail-item-left { display: flex; flex-direction: column; gap: 4rpx; flex: 1; min-width: 0; } .detail-item-desc { font-size: 26rpx; color: var(--color-text); font-weight: 500; } .detail-item-time { font-size: 20rpx; color: #9CA3AF; } -.detail-item-amount { font-size: 30rpx; font-weight: 700; flex-shrink: 0; margin-left: 16rpx; } +.detail-item-amount { font-size: 30rpx; font-weight: 700; } +.detail-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4rpx; flex-shrink: 0; margin-left: 16rpx; } +.detail-item-balance { font-size: 20rpx; color: #9CA3AF; font-weight: 400; } .amount-positive { color: #10B981; } .amount-negative { color: #EF4444; } .detail-pagination { display: flex; align-items: center; justify-content: center; gap: 24rpx; width: 100%; margin-top: 8rpx; }