fix online client bug

This commit is contained in:
Fang_Zhijian 2026-02-25 21:16:55 +08:00
parent 7e1fc83891
commit 8950b56476
5 changed files with 15 additions and 4 deletions

View File

@ -1,3 +1,9 @@
# 1.0.9
1. 修复全在线客户端无法获取器件数据的问题
2. 扩展包不再打包服务端源码
3. 更新 README 文档
# 1.0.8 # 1.0.8
1. 修复“允许拉起服务端”配置项无效的问题 1. 修复“允许拉起服务端”配置项无效的问题

View File

@ -3,7 +3,7 @@
"uuid": "944f7c94a8ca485e848f1118effcbb9a", "uuid": "944f7c94a8ca485e848f1118effcbb9a",
"displayName": "LEYE", "displayName": "LEYE",
"description": "LEYE 电子元器件库存管理系统 EDA 联动扩展", "description": "LEYE 电子元器件库存管理系统 EDA 联动扩展",
"version": "1.0.8", "version": "1.0.9",
"publisher": "Mr_Fang", "publisher": "Mr_Fang",
"engines": { "engines": {
"eda": "^3.2.80" "eda": "^3.2.80"

View File

@ -267,7 +267,8 @@
let detail = { name: '-', value: '-', footprint: '-', brand: '-', designatorStr: '手动添加', selected: false }; let detail = { name: '-', value: '-', footprint: '-', brand: '-', designatorStr: '手动添加', selected: false };
if (devs[0]) { 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, { const infoRes = await eda.sys_ClientUrl.request(EDA_HOST + '/api/v2/devices/' + devs[0].uuid, 'GET', null, {
headers: { path: '0819f05c4eef4c71ace90d822a990e87' }, headers: { path: '0819f05c4eef4c71ace90d822a990e87' },
}); });

View File

@ -510,7 +510,8 @@
if (dev && dev.uuid) { if (dev && dev.uuid) {
try { 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, { const infoRes = await eda.sys_ClientUrl.request(EDA_HOST + '/api/v2/devices/' + dev.uuid, 'GET', null, {
headers: { path: '0819f05c4eef4c71ace90d822a990e87' }, headers: { path: '0819f05c4eef4c71ace90d822a990e87' },
}); });

View File

@ -298,7 +298,10 @@
const chunkData = await Promise.all( const chunkData = await Promise.all(
chunk.map(async (dev) => { chunk.map(async (dev) => {
try { 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, { const infoRes = await eda.sys_ClientUrl.request(EDA_HOST + '/api/v2/devices/' + dev.uuid, 'GET', null, {
headers: { path: '0819f05c4eef4c71ace90d822a990e87' }, headers: { path: '0819f05c4eef4c71ace90d822a990e87' },
}); });