Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/i18n_pack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,7 @@ mod tests {
fn api_js_checker_detects_injected_defects() {
let LanguagePacks { zh, en, .. } = packs();

// ① 中文原文(原封不动地模拟 C2028 修前的 `api.js:66` 那一行)必须被判为违规
// ① 中文原文(原封不动地模拟 C2028 修前 `api.js` 里的那一行)必须被判为违规
let bad = "throw { status: 0, message: mapErr(\"网络不可用,请检查后端服务是否启动\") };";
assert!(
!strip_js_comments(bad).is_ascii(),
Expand Down
2 changes: 1 addition & 1 deletion src/routes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2387,7 +2387,7 @@ mod tests {

/// `total_txs` —— 运营概览「交易量」卡的数据源。
///
/// 这个字段自 `85982e8`(PR #80)起就在算、就在返回(`ops.rs:101`/`:175`),
/// 这个字段自 `85982e8`(PR #80)起就在算、就在返回(`ops.rs::runtime` 内计算并作为 `total_txs` 返回),
/// 但**两侧都没有任何断言**:v1.22 的零 mock 重构(`89963f3`)删掉 mock 分支的
/// 那张卡后,前端漏了重接,而这个字段照旧返回,于是谁都发现不了。
/// 本测试把「返回了」与「口径是全库 / 累计全部类型」同时钉住。
Expand Down
2 changes: 1 addition & 1 deletion ui/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -845,6 +845,6 @@ <h3 id="chat-title">使用模型</h3>
<script src="js/api.js?v=20260912-5"></script>
<script src="js/data.js?v=20260912-5"></script>
<script src="js/i18n.js?v=20260912-5"></script>
<script src="js/app.js?v=20260914-1"></script>
<script src="js/app.js?v=20260914-2"></script>
</body>
</html>
2 changes: 1 addition & 1 deletion ui/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@
// 点数方向由 `type` 决定,不由 `pts` 的符号决定(C2047):
// 账本按 type 编码方向,所有生产 writer 都把 pts 存成非负数 —— `billing::settle` 的
// consume 行存正数、随后的 earn 行也存正数(src/billing.rs),符号只表示「数值」,不表示「收支」。
// 服务端每个聚合都是按 type 判方向(src/routes/wallet.rs:230-232 / 403-405 / 473、src/routes/ops.rs:94/103),
// 服务端每个聚合都是按 type 判方向(src/routes/wallet.rs 的 TX_INCOME_TYPES / TX_EXPENSE_TYPES、src/routes/ops.rs:94/103),
// 前端必须用同一约定,否则「消费」在汇总卡里是支出(`expense_pts`)、在明细行里却被渲染成绿色的 `+3.7`。
const PTS_INCOME_TYPES = { earn: true, topup: true, gift: true };
const signedPts = (type, pts) => (PTS_INCOME_TYPES[type] === true ? pts : -pts);
Expand Down
Loading