@nywqs/scada-engine 1.1.17 → 1.1.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +34 -34
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -346,30 +346,26 @@ const handlePreview = () => {
346
346
 
347
347
  ### 软件授权使用
348
348
 
349
- 本软件默认在底部显示版权信息。如需隐藏或修改版权信息,必须获取授权码。
349
+ 本软件默认在底部显示版权信息。如需隐藏或修改版权信息,必须使用有效的数字签名令牌与公钥。
350
350
 
351
- #### 获取授权码
351
+ #### 获取授权
352
+
353
+ 请联系作者获取:
354
+ 1. **授权令牌 (Token)**:包含公司名、有效期等信息的签名串。
355
+ 2. **公钥 (Public Key)**:用于验证签名的 `public.pem` 文件内容。
352
356
 
353
- 请联系作者获取授权码:
354
357
  - 邮箱:nywqs@outlook.com
355
358
  - 电话:18637762001
356
359
 
357
- #### 使用授权码
360
+ #### 使用方式
358
361
 
359
- ```vue
360
- <template>
361
- <ScadaCanvas
362
- auth-code="your-auth-code-here"
363
- />
364
- </template>
365
- ```
366
-
367
- #### 自定义 Footer 信息(需授权)
362
+ 在使用 `ScadaCanvas` 组件时,需同时传入 `auth-code`(令牌)与 `public-key-pem`(公钥内容)。
368
363
 
369
364
  ```vue
370
365
  <template>
371
366
  <ScadaCanvas
372
- auth-code="your-auth-code-here"
367
+ :auth-code="licenseToken"
368
+ :public-key-pem="publicKey"
373
369
  :custom-footer="{
374
370
  copyright: '© 2025 您的公司',
375
371
  license: '商业授权使用',
@@ -377,25 +373,33 @@ const handlePreview = () => {
377
373
  }"
378
374
  />
379
375
  </template>
376
+
377
+ <script setup lang="ts">
378
+ // 填入从授权方获取的 Token 字符串
379
+ const licenseToken = 'eyJh...<完整Token字符串>'
380
+
381
+ // 填入 public.pem 的完整内容
382
+ const publicKey = `-----BEGIN PUBLIC KEY-----
383
+ MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExxxxxxxxxxxxxxxxxxxxxxxxxxxx
384
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
385
+ xxxxxxxx==
386
+ -----END PUBLIC KEY-----`
387
+ </script>
380
388
  ```
381
389
 
382
390
  **授权模式说明**
383
- - 不提供 authCode:显示默认版权信息
384
- - 有效 authCode + 无 customFooter:隐藏 Footer
385
- - 有效 authCode + customFooter:显示自定义 Footer
386
-
387
- **授权信息解密**
391
+ - 未提供有效 Token 或 公钥验证失败:显示默认版权信息
392
+ - 验证通过 + 无 customFooter:隐藏 Footer
393
+ - 验证通过 + customFooter:显示自定义 Footer
388
394
 
389
- 授权码采用 AES-256-CBC + OpenSSL 格式加密,可解密出:
390
- - 公司/授权名称
391
- - 有效期(可选)
392
- - 机器码绑定(可选)
395
+ **授权验证机制**
396
+ 采用 ECDSA P-256 + SHA-256 数字签名技术。前端仅持有公钥进行验签,无法伪造授权。
393
397
 
394
398
  控制台会输出授权验证信息:
395
399
  ```javascript
396
- 授权验证成功
397
- 授权公司: leoncheng
398
- 有效期至: 2026-12-17
400
+ 授权验证成功
401
+ 🏛️ 授权公司: ACME Corp
402
+ 📅 有效期至: 2026-12-31
399
403
  ```
400
404
 
401
405
  ## 预览模式
@@ -488,15 +492,11 @@ npm publish
488
492
 
489
493
  ## 许可协议
490
494
 
491
- 版权所有 © 2025 leoncheng
492
-
493
- 本项目采用专有许可协议,详见 [LICENSE](LICENSE) 文件。
495
+ 本项目采用 **MIT 许可协议**,详见 [LICENSE](LICENSE) 文件。
494
496
 
495
- 简要说明:
496
- - 允许用于学习和研究目的
497
- - 禁止未经授权的商业使用
498
- - 商业使用需获取书面授权和有效授权码
499
- - 详细条款请查看 LICENSE 文件
497
+ - 允许商业使用、修改、分发
498
+ - 需保留版权声明与许可文本
499
+ - 软件按“原样”提供,无任何担保
500
500
 
501
501
  如需商业授权,请联系作者。
502
502
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nywqs/scada-engine",
3
- "version": "1.1.17",
3
+ "version": "1.1.18",
4
4
  "description": "自研 SCADA 组态引擎 - 基于 AntV X6",
5
5
  "type": "module",
6
6
  "main": "./dist/scada-engine.umd.js",