From 84dd3d8fd150a8ec3e6fb08e63e57c6263f0beb1 Mon Sep 17 00:00:00 2001 From: hanhh <18330117883@163.com> Date: Wed, 13 Oct 2021 23:50:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=89=88=E6=9C=AC=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=89=A7=E8=A1=8C=E5=91=BD=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/user.ts | 2 +- src/layouts/index.tsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/back/services/user.ts b/back/services/user.ts index e1da9f75..98031bd6 100644 --- a/back/services/user.ts +++ b/back/services/user.ts @@ -411,7 +411,7 @@ export default class UserService { } public async updateSystem() { - const cp = spawn('ql update', { shell: '/bin/bash' }); + const cp = spawn('ql -l update', { shell: '/bin/bash' }); cp.stdout.on('data', (data) => { this.sockService.sendMessage(data.toString()); diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index cfd0132d..1dfac2e9 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -127,12 +127,12 @@ export default function (props: any) { ws.current = new SockJS( `${location.origin}/api/ws?token=${localStorage.getItem(config.authKey)}`, ); - ws.current.onopen = (e) => { - console.log('ws opened', e); + ws.current.onopen = (e: any) => { + console.log('websocket连接成功', e); }; - ws.current.onclose = (e) => { - console.log('ws closed', e); + ws.current.onclose = (e: any) => { + console.log('websocket已关闭', e); }; const wsCurrent = ws.current;