From aaeb962bd0ef7c7411384ce5c30919f1a79a4aac Mon Sep 17 00:00:00 2001 From: cf-erp Date: Wed, 25 Mar 2020 10:25:29 +0800 Subject: [PATCH] =?UTF-8?q?!866=20=E6=8B=86=E5=8D=95=E8=B6=85=E9=95=BF?= =?UTF-8?q?=E6=9D=BF=E9=85=8D=E7=BD=AE=E8=AF=BB=E5=8F=96WebCad=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=EF=BC=8C=E5=BF=83=E8=B7=B3=E5=8C=85=E6=9B=B4=E6=96=B0?= =?UTF-8?q?token?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Add-on/Erp/ErpCommands.ts | 4 +++- src/UI/Store/TopPanelStore.ts | 9 ++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/Add-on/Erp/ErpCommands.ts b/src/Add-on/Erp/ErpCommands.ts index 35b58fb74..12be23437 100644 --- a/src/Add-on/Erp/ErpCommands.ts +++ b/src/Add-on/Erp/ErpCommands.ts @@ -18,6 +18,7 @@ import { Intent } from "@blueprintjs/core"; import { Entity } from "../../DatabaseServices/Entity/Entity"; import { OrderDataBlock, WaveType } from "./Models/CadBlock"; import { ExceedMind } from "./ExceedBlocksMind"; +import { userConfig } from "../../Editor/UserConfig"; export class ChaiDan implements Command { async exec() @@ -173,8 +174,9 @@ export async function GetProductsEntitys() metalsList, }; } -function checkBlock(blockList: OrderDataBlock[], goods: { length: number, width: number; } = { length: 2440, width: 1220 }): { result: boolean, warnBlocks: OrderDataBlock[], warnMsg: string; } +function checkBlock(blockList: OrderDataBlock[]): { result: boolean, warnBlocks: OrderDataBlock[], warnMsg: string; } { + let goods = { length: userConfig.maxSize.height, width: userConfig.maxSize.width }; let msg: string = ''; let resultBlocks: OrderDataBlock[] = []; let lengthdeflashing: number = 6; //长修边 diff --git a/src/UI/Store/TopPanelStore.ts b/src/UI/Store/TopPanelStore.ts index dfdb97165..2b8e57328 100644 --- a/src/UI/Store/TopPanelStore.ts +++ b/src/UI/Store/TopPanelStore.ts @@ -46,7 +46,14 @@ export class TopPanelStore extends Singleton //每20分钟发送一次心跳包 setInterval(() => { - PostJson(SignUrl.heart, {}); + PostJson(SignUrl.heart, {}).then(data => + { + if (data.err_code == 0) + { + localStorage.setItem(StoreageKeys.PlatSession, data.session); + localStorage.setItem(StoreageKeys.PlatToken, data.token); + } + }); }, 20 * 60 * 1000); let needOpacityEls = [ document.getElementById("app"),