Compare commits

...

2 Commits

Author SHA1 Message Date
8950b56476 fix online client bug 2026-02-25 21:16:55 +08:00
7e1fc83891 Ignore the backend directory 2026-02-25 20:55:40 +08:00
7 changed files with 28 additions and 13 deletions

View File

@ -17,4 +17,5 @@
/package-lock.json /package-lock.json
/package.json /package.json
/tsconfig.json /tsconfig.json
/backend/
debug.log debug.log

View File

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

View File

@ -10,14 +10,16 @@ LEYE 电子元器件库存管理系统 EDA 联动扩展
本扩展允许用户通过立创商城 C 编号、立创商城订单导入元器件,支持从库存内查询、放置器件,支持通过 BOM 批量出库。 本扩展允许用户通过立创商城 C 编号、立创商城订单导入元器件,支持从库存内查询、放置器件,支持通过 BOM 批量出库。
使用本扩展需要在本地安装 [LEYE Service 服务端](https://lrurl.top/LeyeService)(目前仅提供 Windows 版),数据均储存在本地,不会上传。 使用本扩展需要在本地安装 [LEYE Service 服务端](https://lrurl.top/LeyeService)(目前仅提供 Windows 版[服务端开源](/backend/server.js)),数据均储存在本地,不会上传。
## [介绍视频](https://www.bilibili.com/video/BV1nvcFzpEuP/) ## [介绍视频](https://www.bilibili.com/video/BV1nvcFzpEuP/)
https://www.bilibili.com/video/BV1nvcFzpEuP/ https://www.bilibili.com/video/BV1nvcFzpEuP/
## 如何使用 ## 如何使用
安装本扩展后**需要给予扩展外部交互**权限以与服务端交互: 安装本扩展后**需要给予扩展外部交互**权限以与服务端交互:
- V2.2:设置-扩展-扩展管理器-LEYE-允许外部交互; - V2.2:设置-扩展-扩展管理器-LEYE-允许外部交互;
- V3高级-扩展管理器-已安装-LEYE-配置-允许外部交互。 - V3高级-扩展管理器-已安装-LEYE-配置-允许外部交互。
@ -41,12 +43,12 @@ V2.2 用户菜单栏将直接出现“LEYE”选项V3 用户若未开启“
![img03](/images/img_03.png) ![img03](/images/img_03.png)
> **Tip: 扫描立创商城二维码导入器件** *V1.0.5+* > **Tip: 扫描立创商城二维码导入器件** _V1.0.5+_
> >
> 在 V1.0.5 版本以上,可以通过扫描立创商城物料包装上的二维码导入器件,扫描后会自动识别 CID 并导入对应器件。 > 在 V1.0.5 版本以上,可以通过扫描立创商城物料包装上的二维码导入器件,扫描后会自动识别 CID 并导入对应器件。
> ![img07](/images/img_07.png) > ![img07](/images/img_07.png)
> **Tip: 使用手机扫码导入器件** *V1.0.6+* > **Tip: 使用手机扫码导入器件** _V1.0.6+_
> >
> 在 V1.0.6 版本以上可以在扫码界面选择“WebSocket 远程扫码”,点击“打开摄像头”按钮后用手机扫描二维码即可打开远程端。 > 在 V1.0.6 版本以上可以在扫码界面选择“WebSocket 远程扫码”,点击“打开摄像头”按钮后用手机扫描二维码即可打开远程端。
> 远程端同样支持扫描立创商城物料包装上的二维码导入器件,扫描后会自动识别 CID 并导入对应器件。 > 远程端同样支持扫描立创商城物料包装上的二维码导入器件,扫描后会自动识别 CID 并导入对应器件。
@ -62,10 +64,10 @@ V2.2 用户菜单栏将直接出现“LEYE”选项V3 用户若未开启“
## 配置项说明 ## 配置项说明
| 配置项 | 说明 | 默认值 | | 配置项 | 说明 | 默认值 |
|:-------------|:-----------------------------------------------------------|:-------------------------| | :------------- | :----------------------------------------------------------------------- | :----------------------- |
| 服务器地址 | LEYE Service 服务器地址 | `http://localhost:21816` | | 服务器地址 | LEYE Service 服务器地址 | `http://localhost:21816` |
| 允许拉起服务端 | 允许通过 [`leye://open`](leye://open) 拉起本地安装的 LEYE Service 服务端 | `true` | | 允许拉起服务端 | 允许通过 [`leye://open`](leye://open) 拉起本地安装的 LEYE Service 服务端 | `true` |
## 已知问题 ## 已知问题
@ -74,6 +76,7 @@ V2.2 用户菜单栏将直接出现“LEYE”选项V3 用户若未开启“
## 开源许可 ## 开源许可
本扩展使用以下开源软件: 本扩展使用以下开源软件:
- [SheetJS](https://www.npmjs.com/package/xlsx)Excel 解析库,使用 [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) 许可协议授权 - [SheetJS](https://www.npmjs.com/package/xlsx)Excel 解析库,使用 [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) 许可协议授权
- [jsQR](https://www.npmjs.com/package/jsqr):二维码解析库,使用 [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) 许可协议授权 - [jsQR](https://www.npmjs.com/package/jsqr):二维码解析库,使用 [Apache License 2.0](https://choosealicense.com/licenses/apache-2.0/) 许可协议授权
- [node-qrcode](https://www.npmjs.com/package/qrcode):二维码生成库,使用 [MIT License](https://choosealicense.com/licenses/mit/) 许可协议授权 - [node-qrcode](https://www.npmjs.com/package/qrcode):二维码生成库,使用 [MIT License](https://choosealicense.com/licenses/mit/) 许可协议授权

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' },
}); });