diff --git a/entry/src/main/ets/pages/ledger/FbLedgerPage.ets b/entry/src/main/ets/pages/ledger/FbLedgerPage.ets index 35931fa..441f7c9 100644 --- a/entry/src/main/ets/pages/ledger/FbLedgerPage.ets +++ b/entry/src/main/ets/pages/ledger/FbLedgerPage.ets @@ -280,7 +280,13 @@ export struct FbLedgerPage { .fontSize(FbMetric.fontSmall) .fontColor(this.isCurrent(b.id) ? Color.White : FbColors.muted) .maxLines(1) - if (b.myPerm !== 'owner') { + /* 🔴 v68 真机验收补漏(2026-10-20):判据原来是 `myPerm !== 'owner'`, + 而服务端 `Ledger::find` **从来不给 `owner`**(主人也是 `write`) + ⇒ 这个 if **永远成立**,自己建的那本也被贴了颗「可写」, + 看上去像"这本账只是被共享给我的"。 + 主人身份只能看服务端新补的 `is_owner`(`FbLedgerBook.isOwner`)。 + ⚠️ 同一批里 `myPerm` 的注释也写着 `owner/read/write`,同样是错的,别再照着抄。 */ + if (!b.isOwner) { FbTag({ text: b.myPerm === 'write' ? '可写' : '只读', tone: this.isCurrent(b.id) ? 'brand' : 'muted' @@ -539,7 +545,8 @@ export struct FbLedgerPage { accent: this.accent, ledgerId: this.currentId(), ledgerName: this.currentBook().name, - // 主人才能改共享:`myPerm` 是服务端 `Ledger::find` 给的 + /* 主人才能改共享:身份看 `is_owner`(服务端 `Ledger::find` 新补的布尔)。 + ⚠️ 别用 `myPerm === 'owner'` —— 服务端枚举里根本没有 `owner` 这个值。 */ isOwner: this.currentBook().isOwner, onClose: (): void => { this.shareOpen = false; diff --git a/entry/src/main/ets/pages/trips/FbTripsPage.ets b/entry/src/main/ets/pages/trips/FbTripsPage.ets index 3581e0f..bb89f44 100644 --- a/entry/src/main/ets/pages/trips/FbTripsPage.ets +++ b/entry/src/main/ets/pages/trips/FbTripsPage.ets @@ -541,18 +541,21 @@ export struct FbTripsPage { .onClick((): void => { // 点卡片主体 = 展开/收起行程(网页版是"进详情",手机上一屏放不下, // 就地展开更顺手;编辑走下面那颗小按钮) - const was: boolean = this.isExpanded(t.id); - this.expandedId = was ? 0 : t.id; - if (!was) { - this.loadNodes(t.id); - } + this.toggleExpand(t); }) // ---- 卡尾操作条:编辑(网页版进详情页才有编辑,这里给个显式入口)---- Row({ space: 14 }) { + /* 🔴 这颗原来只是「字」,没有 `onClick` —— 屏幕上写着"查看行程"却点不动。 + 现在接上 `toggleExpand`(与卡片主体同一份逻辑),并加内边距把热区做大 + (字号只有 fontTiny,纯文字热区太小,真机上不好点)。 */ Text(this.isExpanded(t.id) ? '收起行程' : '查看行程') .fontSize(FbMetric.fontTiny) .fontColor(this.accent) + .padding({ left: 6, right: 10, top: 8, bottom: 8 }) + .onClick((): void => { + this.toggleExpand(t); + }) Column().layoutWeight(1) Text('编辑') .fontSize(FbMetric.fontTiny) @@ -821,6 +824,23 @@ export struct FbTripsPage { return this.expandedId === id; } + /** + * 展开 / 收起某个旅程的行程时间轴。 + * + * 🔴 v66 真机验收补漏(2026-10-20):原来这段逻辑**只写在卡片主体的 onClick 里**, + * 而卡尾那颗「查看行程 / 收起行程」是一颗**没有任何 onClick 的纯 Text** + * ⇒ 屏幕上明明写着「查看行程」,点它却什么都不发生(真机验收 C2/C3/C4 就是这么红的)。 + * 这类"看得见、点不动"的入口是本项目的红线,必须两处都能点。 + * ⇒ 抽成一个方法,卡片主体与卡尾文字共用,行为不会漂。 + */ + private toggleExpand(trip: FbTripItem): void { + const was: boolean = this.isExpanded(trip.id); + this.expandedId = was ? 0 : trip.id; + if (!was) { + this.loadNodes(trip.id); + } + } + private nodesOf(stage: string): FbTripNode[] { return this.nodes.filter((n: FbTripNode): boolean => n.stage === stage); }