Browse Source

fix:获取设备信息

master
guoapeng 2 weeks ago
parent
commit
d31832682c
  1. 20
      src/app.vue

20
src/app.vue

@ -17,6 +17,7 @@ import { useSealStore } from './stores/sealStore'
*/ */
// //
const deviceStore = useDeviceStore()
const homeStore = useHomeStore() const homeStore = useHomeStore()
const formulaStore = useFormulaStore() const formulaStore = useFormulaStore()
const liquidStore = useLiquidStore() const liquidStore = useLiquidStore()
@ -37,6 +38,7 @@ let timer: any = null // 进度条定时器
onBeforeMount(async () => { onBeforeMount(async () => {
startProgress() // startProgress() //
await systemStore.getSystemTime() // await systemStore.getSystemTime() //
await initDeviceInfo()
}) })
// store // store
subscribeEvent('stateUpdate', (data) => { subscribeEvent('stateUpdate', (data) => {
@ -113,15 +115,15 @@ const initData = async () => {
* @function 初始化设备信息 * @function 初始化设备信息
* @desc 从服务端获取设备信息并更新到状态存储 * @desc 从服务端获取设备信息并更新到状态存储
*/ */
// const initDeviceInfo = async () => {
// const deviceParams = {
// className: 'DeviceInfoMgrService',
// fnName: 'getDeviceInfo',
// }
// const res = await sendCmd(deviceParams)
// deviceStore.updateDeviceInfo(res)
// return res
// }
const initDeviceInfo = async () => {
const deviceParams = {
className: 'DeviceInfoMgrService',
fnName: 'getDeviceInfo',
}
const res = await sendCmd(deviceParams)
deviceStore.updateDeviceInfo(res)
return res
}
/** /**
* @function 初始化 * @function 初始化

Loading…
Cancel
Save