# 获取打印组件版本号

发送指令给打印组件,获取打印组件的版本号

# 请求示例

const ws = new WebSocket('ws://127.0.0.1:12705');
ws.onopen = () => {
    console.log('与打印组件建立连接成功: ');
    ws.send(JSON.stringify({
        requestID: '1234',
        command: 'getAppInfo'
    }))
};

ws.onmessage = (e) => {
    const resp = JSON.parse(e.data || '{}')
    if (resp.command === 'getAppInfo') {
        console.log('打印组件版本信息: ', resp);
    }
};

# 返回参数示例

{
  "command": "getAppInfo",
  "requestID": "1234",
  "appInfo": {
      "version": "1.3.4",
  },
}