From 19b160620f229d9aa419b43c9d42ce6cfb406f5f Mon Sep 17 00:00:00 2001 From: oneao Date: Wed, 11 Feb 2026 21:58:22 +0800 Subject: [PATCH] u --- code/allapp/allapp-rn/test.html | 289 ++++++++++++++++++++------------ 1 file changed, 183 insertions(+), 106 deletions(-) diff --git a/code/allapp/allapp-rn/test.html b/code/allapp/allapp-rn/test.html index 0d2256e0..1a79680a 100644 --- a/code/allapp/allapp-rn/test.html +++ b/code/allapp/allapp-rn/test.html @@ -1,130 +1,207 @@ - - biz_key 私聊演示 - +.summary-item strong { + font-size: 18px; + font-weight: 600; +} + +/* 日期分组 */ +.date-group { + margin-top: 12px; +} + +.date-header { + padding: 8px 16px; + font-size: 13px; + color: #666; +} + +/* 账单项 */ +.record { + background: #fff; + padding: 14px 16px; + display: flex; + justify-content: space-between; + align-items: center; + border-bottom: 1px solid #f0f0f0; +} + +.record-left { + display: flex; + flex-direction: column; +} + +.record-type { + font-size: 15px; + font-weight: 500; +} + +.record-desc { + font-size: 12px; + color: #999; + margin-top: 4px; +} + +.record-amount { + font-size: 16px; + font-weight: 600; +} + +.income { + color: #2bb673; +} + +.expense { + color: #e74c3c; +} + + -

biz_key 私聊唯一性演示

+
-
- -
-

用户

-
用户 A
user_id = 1
-
用户 B
user_id = 2
-
- -
➡️
- - -
-

biz_key 生成

-
- min(1,2) _ max(1,2)
- =
- 1_2 + +
+
本月统计
+
+
+ 收入 + {{ totalIncome }}
-
- 不管 A→B 还是 B→A
- biz_key 都是一样的 +
+ 支出 + {{ totalExpense }}
-
- -
➡️
- - -
-

数据库会话表

-
- id: 1001
- space_id: 100
- type: 私聊
- biz_key: 1_2 -
-
- 唯一索引:
- (space_id, type, biz_key) +
+ 结余 + {{ balance }}
-
- 👉 结论:
- biz_key = “这是谁和谁的私聊”
- id = “数据库给它的编号” + +
+
{{ group.date }}
+ +
+
+
{{ item.category }}
+
{{ item.remark }}
+
+
+ {{ item.type === 'income' ? '+' : '-' }}{{ item.amount }} +
+
+ +
+ + +