From 8950b56476b89bbab328ea4a6d21ff492a6865dd Mon Sep 17 00:00:00 2001 From: Fang_Zhijian Date: Wed, 25 Feb 2026 21:16:55 +0800 Subject: [PATCH] fix online client bug --- CHANGELOG.md | 6 ++++++ extension.json | 2 +- iframe/export.html | 3 ++- iframe/import.html | 3 ++- iframe/newLeye.html | 5 ++++- 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index badd22d..54b5895 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +# 1.0.9 + +1. 修复全在线客户端无法获取器件数据的问题 +2. 扩展包不再打包服务端源码 +3. 更新 README 文档 + # 1.0.8 1. 修复“允许拉起服务端”配置项无效的问题 diff --git a/extension.json b/extension.json index edbabb4..2ad943a 100644 --- a/extension.json +++ b/extension.json @@ -3,7 +3,7 @@ "uuid": "944f7c94a8ca485e848f1118effcbb9a", "displayName": "LEYE", "description": "LEYE 电子元器件库存管理系统 EDA 联动扩展", - "version": "1.0.8", + "version": "1.0.9", "publisher": "Mr_Fang", "engines": { "eda": "^3.2.80" diff --git a/iframe/export.html b/iframe/export.html index 6540536..2d2bc70 100644 --- a/iframe/export.html +++ b/iframe/export.html @@ -267,7 +267,8 @@ let detail = { name: '-', value: '-', footprint: '-', brand: '-', designatorStr: '手动添加', selected: false }; if (devs[0]) { - const EDA_HOST = eda.sys_Environment.isClient() ? 'https://client' : 'https://pro.lceda.cn'; + const EDA_HOST = + eda.sys_Environment.isClient() && !eda.sys_Environment.isOnlineMode() ? 'https://client' : 'https://pro.lceda.cn'; const infoRes = await eda.sys_ClientUrl.request(EDA_HOST + '/api/v2/devices/' + devs[0].uuid, 'GET', null, { headers: { path: '0819f05c4eef4c71ace90d822a990e87' }, }); diff --git a/iframe/import.html b/iframe/import.html index c901cf9..2414204 100644 --- a/iframe/import.html +++ b/iframe/import.html @@ -510,7 +510,8 @@ if (dev && dev.uuid) { try { - const EDA_HOST = eda.sys_Environment.isClient() ? 'https://client' : 'https://pro.lceda.cn'; + const EDA_HOST = + eda.sys_Environment.isClient() && !eda.sys_Environment.isOnlineMode() ? 'https://client' : 'https://pro.lceda.cn'; const infoRes = await eda.sys_ClientUrl.request(EDA_HOST + '/api/v2/devices/' + dev.uuid, 'GET', null, { headers: { path: '0819f05c4eef4c71ace90d822a990e87' }, }); diff --git a/iframe/newLeye.html b/iframe/newLeye.html index 46bf58a..ffa3e03 100644 --- a/iframe/newLeye.html +++ b/iframe/newLeye.html @@ -298,7 +298,10 @@ const chunkData = await Promise.all( chunk.map(async (dev) => { try { - const EDA_HOST = eda.sys_Environment.isClient() ? 'https://client' : 'https://pro.lceda.cn'; + const EDA_HOST = + eda.sys_Environment.isClient() && !eda.sys_Environment.isOnlineMode() + ? 'https://client' + : 'https://pro.lceda.cn'; const infoRes = await eda.sys_ClientUrl.request(EDA_HOST + '/api/v2/devices/' + dev.uuid, 'GET', null, { headers: { path: '0819f05c4eef4c71ace90d822a990e87' }, });