Skip to content

Commit

Permalink
🐛 (支付宝蚂蚁财富): 修复支付宝蚂蚁财富规则的错误
Browse files Browse the repository at this point in the history
修复了支付宝蚂蚁财富规则中,对收入和支出判断错误的问题。

-  - 修正了 `main.js` 中对金额的判断,避免负数金额被识别为支出
-  - 更新了 `main.js` 中对通道的描述
-  - 调整了 `category.js` 中的分类逻辑,使之更准确地识别支付宝蚂蚁财富的交易类型
  • Loading branch information
AnkioTomas committed Sep 30, 2024
1 parent 27b4445 commit bd7bb78
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/category/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ export function get(money, type, shopName, shopItem, time) {
break;
}
}
return { "parent":category,"category": getLevel2(category), "book": '默认账本' };
return {"category": getLevel2(category), "book": '默认账本' };
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,8 @@ function pay(pl,t){
let obj = new RuleObject(BillType.Income);
if (pl.content.indexOf("∝")===-1)return null
obj.money = toFloat(pl.content);
if (obj.money < 0) {
if (pl.content.indexOf("-")!==-1) {
obj.type = BillType.Expend;
obj.money = -obj.money;
}
obj.channel = `支付宝[蚂蚁财富]`;

Expand Down

0 comments on commit bd7bb78

Please sign in to comment.