更新串口插件
This commit is contained in:
@@ -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) })
|
||||
|
||||
Reference in New Issue
Block a user