feat: add Douyin monthly pay and East Money catalog icons

This commit is contained in:
陈煜 committed 2026-10-03 12:37:03 +08:00
1 parent 1af5edbadc
commit 59837cf09c
7 files changed
+44 -2

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

+12
View File
@@ -202,5 +202,17 @@
"file": "34.png",
"source": "https://is1-ssl.mzstatic.com/image/thumb/Purple211/v4/d4/bc/60/d4bc6004-3898-c9c3-3571-f3ffe4b46b48/Bank-Airstar-0-0-1x_U007epad-0-1-sRGB-85-220.png/512x512bb.jpg",
"sha256": "fa7306514308f0a8cc73fa3847002d768094cec25aceeca324da440fbbee2934"
},
{
"name": "抖音月付",
"source": "https://p26-infras.byteimg.com/static-assets/be18bb89d2ceeec6407aae38dc5e894c.png~tplv-49obo7mizy-png75.png",
"file": "35.png",
"sha256": "78e612542243c1b72d9ad6e3793efd2702295c7dafdcac7427389b7cafd81dea"
},
{
"name": "东方财富",
"source": "https://g1.dfcfw.com/g4/202307/20230731180250.png",
"file": "36.png",
"sha256": "f4076632019946fc25db345308ca360eea1faf0d3009f0908e98605c97ed0a5d"
}
]
+6 -1
View File
@@ -5,6 +5,7 @@ from PIL import Image
folder = Path(__file__).resolve().parent.parent / 'assets' / 'icons'
catalog = json.loads((folder / 'sources.json').read_text(encoding='utf-8'))
brands = [('汇丰香港', 'https://www.hsbc.com.hk'), ('恒生银行', 'https://www.hangseng.com'), ('中银香港', 'https://www.bochk.com/en'), ('渣打香港', 'https://www.sc.com/hk'), ('东亚银行', 'https://www.hkbea.com'), ('星展香港', 'https://www.dbs.com.hk'), ('花旗香港', 'https://www.citibank.com.hk'), ('币安 Binance', 'https://www.binance.com'), ('Gate', 'https://www.gate.com'), ('Bybit', 'https://www.bybit.com'), ('Bitget', 'https://www.bitget.com')]
brands += [('抖音月付', 'https://www.douyinpay.com'), ('东方财富', 'https://about.eastmoney.com/about/product')]
brands += [('ZA BANK 众安银行', 'https://bank.za.group'), ('大象银行 EleBank', 'https://www.elebank.com'), ('微众银行 WeBank', 'https://www.webank.com')]
if len(sys.argv) > 1:
brands = [item for item in brands if item[0] in sys.argv[1:]]
@@ -14,7 +15,7 @@ def get(url):
failed = []
for name, site in brands:
if any(v['name'] == name for v in catalog): continue
urls = {'币安 Binance': ['https://bin.bnbstatic.com/static/images/common/favicon.ico', 'https://bin.bnbstatic.com/static/images/common/favicon.png'], '中银香港': ['https://www.bochk.com/dam/bochk/desktop/top/favicon.ico', 'https://www.bochk.com/favicon.ico'], '大象银行 EleBank': ['https://is1-ssl.mzstatic.com/image/thumb/Purple211/v4/d4/bc/60/d4bc6004-3898-c9c3-3571-f3ffe4b46b48/Bank-Airstar-0-0-1x_U007epad-0-1-sRGB-85-220.png/512x512bb.jpg']}.get(name, [])
urls = {'抖音月付': ['https://p26-infras.byteimg.com/static-assets/be18bb89d2ceeec6407aae38dc5e894c.png~tplv-49obo7mizy-png75.png'], '东方财富': ['https://g1.dfcfw.com/g4/202307/20230731180250.png'], '币安 Binance': ['https://bin.bnbstatic.com/static/images/common/favicon.ico', 'https://bin.bnbstatic.com/static/images/common/favicon.png'], '中银香港': ['https://www.bochk.com/dam/bochk/desktop/top/favicon.ico', 'https://www.bochk.com/favicon.ico'], '大象银行 EleBank': ['https://is1-ssl.mzstatic.com/image/thumb/Purple211/v4/d4/bc/60/d4bc6004-3898-c9c3-3571-f3ffe4b46b48/Bank-Airstar-0-0-1x_U007epad-0-1-sRGB-85-220.png/512x512bb.jpg']}.get(name, [])
if name == '微众银行 WeBank':
try:
script = get('https://tctp.tctpwebankcdn.net/owb-res/owb-res/assets/mainGenerator.811f2078.js').decode('utf-8')
@@ -32,6 +33,10 @@ for name, site in brands:
try:
raw = get(url)
im = Image.open(io.BytesIO(raw)).convert('RGBA')
if name == '东方财富':
# Official horizontal logo: retain its standalone symbol for square account cards.
im = im.crop((int(im.width * 40 / 256), 0, int(im.width * 80 / 256), im.height))
if im.getbbox(): im = im.crop(im.getbbox())
im.thumbnail((256,256))
out = io.BytesIO(); im.save(out, 'PNG'); png = out.getvalue()
file = str(len(catalog) + 1).zfill(2) + '.png'
+4
View File
@@ -74,3 +74,7 @@
## 2026-10-03 分组排序
32 项单元测试、13 项真实 MySQL 集成检查、前后端类型检查及生产构建通过。浏览器确认上下移动、保存与刷新持久化,以及账户选择弹窗同序显示。14 个迁移状态最新,9 张表与 89 个字段均有注释;ZIP 新旧排序字段兼容及用户隔离已验证。详见 [更新说明](update-group-order-2026-10-03.md)。
## 2026-10-03 图库补充
内置图库扩充为 36 项,新增“抖音月付”和“东方财富”。真实数据库与已认证接口验证名称搜索、共享范围、图片读取和透明 PNG 规范;已有财务数据保持不变。资源来源与验收见 [更新说明](update-icons-2026-10-03.md)。
+19
View File
@@ -0,0 +1,19 @@
# 2026-10-03 抖音月付与东方财富图标
内置图库新增独立命名的“抖音月付”和“东方财富”,现共 36 项。可在账户新增/编辑的图标选择器或设置页图库按名称搜索并选择,复用现有图标关联和完整备份逻辑。
“抖音月付”采用[抖音支付官网](https://www.douyinpay.com/)公开的抖音品牌标识,并非另行绘制的月付专属标识。“东方财富”采用[东方财富官方产品页](https://about.eastmoney.com/about/product)的品牌符号,从横向标识中保留适合账户卡片的独立图形。公开资源地址和原始内容 SHA-256 记录在 apps/api/assets/icons/sources.json,expand-icons.py 同步添加可复现来源。
图像均保存为静态 PNG,初始化时复用现有尺寸限制、透明处理和固定内置 ID。无需数据库结构变更;已运行 icons:seed,保留用户上传图标与财务记录。
## 验收
- 两个原图已目视检查;透明静态 PNG 均小于 256 × 256。
- 专用临时用户通过已认证 /api/icons?q=名称 搜索到正确共享条目;两个 /api/icons/:id/image 均返回 200 和规范 PNG,透明通道保留。
- 真实数据库核验 36 个固定内置 ID 均存在并处于共享状态。临时用户及脚本已清理。
- 前一轮完整回归保持 32 项单元测试、13 项 MySQL 集成检查、类型检查和构建通过;本次仅增加图库资源,补充上述图库接口专项验收。
完成时间:2026-10-03 12:36。仅本地 Git 提交,不 push。
![抖音月付图标](../apps/api/assets/icons/35.png)
![东方财富图标](../apps/api/assets/icons/36.png)
+3 -1
View File
@@ -34,7 +34,7 @@
- ~~备份功能出现问题~~ — 已完成并验证:2026-10-03 11:22
- ~~负债(如信用卡)也可以显示为正数变成存款~~ — 已完成并验证:2026-10-03 12:05
- ~~分组可以排序~~ — 已完成并验证:2026-10-03 12:27
- “抖音月付”“东方财富”添加图标
- ~~“抖音月付”“东方财富”添加图标~~ — 已完成并验证:2026-10-03 12:36
验证与部署边界见 [更新说明](docs/update-2026-10-02.md)。
@@ -47,3 +47,5 @@
负债账户溢缴验收完成:2026-10-03 12:05。30 项单元测试、12 项真实 MySQL 集成检查、类型检查和构建通过;支持信用卡等负债账户正数存款显示及总资产分类,已有数据符号保留。详见 [更新说明](docs/update-credit-balance-2026-10-03.md)。复查发现新增“分组可以排序”,继续处理。
分组排序验收完成:2026-10-03 12:27。32 项单元测试、13 项真实 MySQL 集成检查、类型检查与构建通过;14 个迁移已应用,9 张表与 89 个字段注释已核验。账户页、筛选与选择弹窗顺序同步并持久化,备份恢复包含分组顺序。详见 [更新说明](docs/update-group-order-2026-10-03.md)。
图库补充验收完成:2026-10-03 12:36。新增“抖音月付”和“东方财富”图标,36 项内置图库已初始化,两个图标的已认证搜索和图片读取通过。详见 [更新说明](docs/update-icons-2026-10-03.md)。