更新串口插件

This commit is contained in:
2026-06-03 15:49:48 +08:00
parent 923b4a3292
commit f5e47f37b3
16 changed files with 1106 additions and 1871 deletions
+6
View File
@@ -198,6 +198,7 @@ import * as db from '@/db/sqlite.js'
import cmd from '@/utils/cmd.js'
import storage from '@/utils/storage.js'
import * as Api from '@/api/index.js'
import serialService from '@/service/serialService.js'
export default {
components: {
PageFooter, PageHeader, Notice, SlotNotice
@@ -288,6 +289,11 @@ export default {
},
onShow() {
// 检测串口服务是否运行(从modbus返回时需要重启)
if (serialService && !serialService.keepRunning) {
// console.log('[index] 检测到串口服务已停止,正在重启...')
serialService.restart()
}
uni.$on('notice', (data) => { this.showNotice(data) })
uni.$on('showDoorSelect', (cardNumber) => { this.showDoorSelect(cardNumber) })
uni.$on('showActionSelect', (cardNumber) => { this.showActionSelect(cardNumber) })