fix: 去掉打卡确认弹窗 + NFC日志排查
- 去掉"确定上班打卡?"确认弹窗,NFC读到卡号直接提交 - 添加NFC开启/扫描日志便于排查无反应问题 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -143,22 +143,16 @@ class PunchFragment : BaseFragment<FragmentPunchBinding>() {
|
||||
// NFC 开启语音+振动(planId=8)
|
||||
VibrationDefaults.getPattern(8)?.let { vibrationController.executePattern(it) }
|
||||
|
||||
// 开启 NFC 扫描
|
||||
// 开启 NFC 扫描(加日志排查)
|
||||
Timber.d("考勤: 开启 NFC")
|
||||
nfcController.open()
|
||||
Timber.d("考勤: NFC isOpen=${nfcController.isOpen()}, 开始扫描")
|
||||
nfcController.startScan { nfcId ->
|
||||
Timber.d("考勤: NFC 读到 $nfcId")
|
||||
Timber.d("考勤: NFC 读到卡号 $nfcId")
|
||||
stopNfc()
|
||||
|
||||
if (currentPunchType == 0) {
|
||||
confirmDialog.showText(
|
||||
text = "确定上班打卡?",
|
||||
onConfirm = { doPunch(nfcId) },
|
||||
onCancel = { resetButton() }
|
||||
)
|
||||
} else {
|
||||
// 不弹确认,直接打卡
|
||||
doPunch(nfcId)
|
||||
}
|
||||
}
|
||||
|
||||
// 10秒超时
|
||||
viewLifecycleOwner.lifecycleScope.launch {
|
||||
|
||||
Reference in New Issue
Block a user