wwt-platform 1.1.10 → 1.1.11

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wwt-platform",
3
- "version": "1.1.10",
3
+ "version": "1.1.11",
4
4
  "description": "WWT 工作平台 - 平台本体与工具清单分发",
5
5
  "files": [
6
6
  "platform.html",
package/platform.html CHANGED
@@ -1357,7 +1357,7 @@ function doAddMod(){
1357
1357
  // ═══════════════════════════════════════════════════════════
1358
1358
  // 平台更新(方案B:平台 + 内置工具统一检查)
1359
1359
  // ═══════════════════════════════════════════════════════════
1360
- const PLATFORM_VER = '1.1.10';
1360
+ const PLATFORM_VER = '1.1.11';
1361
1361
  const NPM_PKG = 'wwt-platform'; // NPM 包名(主力分发源)
1362
1362
  const GITEE_TOKEN_KEY = 'wwt_gitee_token';
1363
1363
  const GITEE_TOKEN_DEF = 'e45883b9c89b8d9689746ce42bbc2b0b';
@@ -1382,7 +1382,7 @@ const SOURCES = [
1382
1382
  // 更新清单:每个条目 = 一个可更新对象(平台或工具)
1383
1383
  // 这是「离线兜底种子」——联网时会与远程 tools.json 合并,远程为准
1384
1384
  const UPD_REG_DEF = [
1385
- {key:'platform', name:'WWT 工作平台', cur:'1.1.10', repo:GITEE_PLATFORM_REPO, verFile:'version.js', appFile:'app.js', pat:'__WWT_PLATFORM_VER', kind:'platform'},
1385
+ {key:'platform', name:'WWT 工作平台', cur:'1.1.11', repo:GITEE_PLATFORM_REPO, verFile:'version.js', appFile:'app.js', pat:'__WWT_PLATFORM_VER', kind:'platform'},
1386
1386
  {key:'erp-recon', name:'ERP 对账工具', cur:'V1.0.2',repo:'wwtmrhu/erp-recon', verFile:'version.js', appFile:'app.js', pat:'__ERP_LATEST_VER'},
1387
1387
  {key:'erp-tool', name:'ERP 对账单生成匹配', cur:'1.0.0', repo:'wwtmrhu/erp-tool', verFile:'version.js', appFile:'app.js', pat:'__ERP_LATEST_VER'},
1388
1388
  {key:'voucher', name:'WWT 凭证工具', cur:'P1.2.12',repo:'wwtmrhu/certificate-generation', verFile:'dist/version.json', appFile:'', pat:'ver', appUrl:true}
@@ -1616,12 +1616,20 @@ function mergeManifest(m) {
1616
1616
 
1617
1617
  // 找出「清单里有、平台界面里还没装」的工具
1618
1618
  function refreshNewTools() {
1619
+ const mods = ST.modules || [];
1620
+ // 模块 id 不存在时回退到第一个模块,避免清单里模块名写错导致工具被静默忽略
1621
+ const resolveMod = (id) => mods.find(x => x.id === id) || mods[0] || null;
1622
+
1619
1623
  _newTools = UPD_REG.filter(it => {
1620
1624
  if (it.key === 'platform' || it.removed) return false;
1621
- const m = (ST.modules || []).find(x => x.id === (it.module || 'fin'));
1625
+ const m = resolveMod(it.module || 'fin');
1622
1626
  if (!m) return false;
1623
1627
  return !(m.tools || []).some(t => t.mkey === it.key);
1624
- }).map(it => ({ key: it.key, name: it.name, desc: it.desc, module: it.module || 'fin', ver: it.cur }));
1628
+ }).map(it => {
1629
+ const m = resolveMod(it.module || 'fin');
1630
+ return { key: it.key, name: it.name, desc: it.desc, module: m.id, ver: it.cur,
1631
+ moduleFixed: it.module && it.module !== m.id };
1632
+ });
1625
1633
  return _newTools;
1626
1634
  }
1627
1635
 
@@ -1790,6 +1798,12 @@ async function openUpdateModal() {
1790
1798
  }
1791
1799
  }
1792
1800
 
1801
+ // 模块 id → 显示名
1802
+ function modName(id) {
1803
+ const m = (ST.modules || []).find(x => x.id === id);
1804
+ return m ? m.name + '模块' : (id || '财务') + '模块';
1805
+ }
1806
+
1793
1807
  function renderUpdList() {
1794
1808
  const body = $id('upd-body');
1795
1809
 
@@ -1801,7 +1815,8 @@ function renderUpdList() {
1801
1815
  + _newTools.map(t =>
1802
1816
  '<div style="display:flex;align-items:center;justify-content:space-between;padding:8px 0;border-top:1px solid #dbeafe">'
1803
1817
  + '<div><div style="font-weight:600;font-size:13.5px">' + esc(t.name) + '</div>'
1804
- + '<div style="font-size:12px;color:var(--text-3)">' + esc(t.desc || '') + ' · v' + esc(t.ver || '') + '</div></div>'
1818
+ + '<div style="font-size:12px;color:var(--text-3)">' + esc(t.desc || '') + ' · v' + esc(t.ver || '')
1819
+ + ' 安装到:' + esc(modName(t.module)) + '</div></div>'
1805
1820
  + '<button class="btn sm prim" onclick="installTool(\'' + t.key + '\')">⬇ 安装</button></div>').join('')
1806
1821
  + '</div>';
1807
1822
  }
package/tools.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema": 1,
3
- "platform": "1.1.10",
3
+ "platform": "1.1.11",
4
4
  "updatedAt": "2026-09-10",
5
5
  "note": "WWT 工作平台工具清单。新增/修改工具只需改这个文件并发布新版本,用户端自动同步,无需重新分发平台。",
6
6
  "tools": [