From c6192a37f4ada8a89f85cfc5e97903ddace15db3 Mon Sep 17 00:00:00 2001 From: wuzuowei Date: Fri, 19 Jul 2024 18:23:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=99=BB=E5=BD=95=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- platform-code/src/microhost/models/system.ts | 8 ++++---- .../src/microhost/system/runtimes/user.ts | 10 +++++----- .../src/pages/tech/login/Senselesslogin.tsx | 18 +++++++++++++----- 3 files changed, 22 insertions(+), 14 deletions(-) diff --git a/platform-code/src/microhost/models/system.ts b/platform-code/src/microhost/models/system.ts index 1f7efcb..dd2a079 100644 --- a/platform-code/src/microhost/models/system.ts +++ b/platform-code/src/microhost/models/system.ts @@ -36,10 +36,10 @@ export class SystemData extends RemoteRequest { } }) } - public setlog = async (obj: any) => { - // console.log("日志参数11111111111111", obj); - return request.post('/Personnel/Personnelapi/LogRecording', obj) - } + // public setlog = async (obj: any) => { + // // console.log("日志参数11111111111111", obj); + // return request.post('/Personnel/Personnelapi/LogRecording', obj) + // } public logout = async () => { await this.request.delete(WebApi.logout, true).then(() => { }); diff --git a/platform-code/src/microhost/system/runtimes/user.ts b/platform-code/src/microhost/system/runtimes/user.ts index 8c5029c..b5636e2 100644 --- a/platform-code/src/microhost/system/runtimes/user.ts +++ b/platform-code/src/microhost/system/runtimes/user.ts @@ -160,12 +160,12 @@ export default class RuntimeUser { , userData?.Name , userData?.OrganName) await MicroApps.GetRuntimeLogger().success(Log.Login, loginId) - let obj = { - OperateUser: loginId || "未登录", - Operate: `${loginId}登陆了工艺数据管理子系统` - } + // let obj = { + // OperateUser: loginId || "未登录", + // Operate: `${loginId}登陆了工艺数据管理子系统` + // } - this.model.setlog(obj) + // this.model.setlog(obj) // console.log("日志参数", obj, loginId,); return true } diff --git a/platform-code/src/pages/tech/login/Senselesslogin.tsx b/platform-code/src/pages/tech/login/Senselesslogin.tsx index fa30caf..f232606 100644 --- a/platform-code/src/pages/tech/login/Senselesslogin.tsx +++ b/platform-code/src/pages/tech/login/Senselesslogin.tsx @@ -114,13 +114,21 @@ const TechLoginView = () => { // history.push(`/animate?url=${encodeURIComponent(jumpTo)}`) + let obj = { + OperateUser: loginId || "未登录", + Operate: `${loginId}登陆了工艺数据管理子系统` + } + const options = { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify(obj), + }; - // let obj = { - // OperateUser: loginId || "未登录", - // Operate: `${loginId}登陆了工艺数据管理子系统` - // } - // request.post('/Personnel/Personnelapi/LogRecording', obj) + + fetch('/Personnel/Personnelapi/LogRecording', options) if (pathValue == "notice") { sessionStorage.setItem("notice", encodeURIComponent(JSON.stringify(pathValue)))