Skip to content

Add plugin 金价动态 v1.0.0#284

Merged
lzx8589561 merged 4 commits into
ZToolsCenter:mainfrom
fantasy-ke:plugin/gold-price-check
Jul 4, 2026
Merged

Add plugin 金价动态 v1.0.0#284
lzx8589561 merged 4 commits into
ZToolsCenter:mainfrom
fantasy-ke:plugin/gold-price-check

Conversation

@fantasy-ke

@fantasy-ke fantasy-ke commented Jul 1, 2026

Copy link
Copy Markdown

插件信息

  • 名称: 金价动态
  • 插件ID: gold-price-check
  • 版本: 1.0.0
  • 描述: 实时查看每日金价、品牌金店价格、银行金条价格、黄金回收价格,以及日内/月度/年度价格波动走势
  • 作者: fantasyke
  • 类型: 新增

本次变更

  • Initial commit

截图 / 演示

QQ20260701-180213

自检清单

  • plugin.json 的 name / title / version / description / author 字段均已检查
  • 已移除调试日志、未使用文件、敏感信息(.env、token、密钥等)
  • 本次 PR 的 diff 仅涉及 plugins/gold-price-check/ 目录
  • 已在本地 ZTools 客户端实际加载并测试过此插件,主要功能正常
  • 同意以仓库声明的开源协议发布此插件

此 PR 由 ztools-plugin-cli 自动管理:每次 ztools publish 在分支上追加一个 commit,PR 链接保持不变。

@fantasy-ke fantasy-ke marked this pull request as ready for review July 1, 2026 09:37

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a new ZTools plugin called 'gold-price-check' (金价动态), built with React 19, TypeScript, and Vite, which displays real-time gold prices and historical trends using recharts. The code review highlights several critical issues, including a mathematical bug in the monthly average price calculation, a lack of defensive checks against empty or malformed API data in several utility functions, potential rendering crashes in the chart component when data is empty, and fragile error handling in the main data loading function. Additionally, it is recommended to clean up unused template components and enable strict TypeScript compilation for better type safety.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread plugins/gold-price-check/src/GoldPrice/services/goldApi.ts
Comment thread plugins/gold-price-check/src/GoldPrice/services/goldApi.ts
Comment thread plugins/gold-price-check/src/GoldPrice/services/goldApi.ts
Comment thread plugins/gold-price-check/src/GoldPrice/services/goldApi.ts Outdated
Comment thread plugins/gold-price-check/src/GoldPrice/services/goldApi.ts Outdated
Comment thread plugins/gold-price-check/src/GoldPrice/services/goldApi.ts Outdated
Comment thread plugins/gold-price-check/src/GoldPrice/index.tsx Outdated
Comment thread plugins/gold-price-check/src/Hello/index.tsx Outdated
Comment thread plugins/gold-price-check/tsconfig.json Outdated
fantasyke added 2 commits July 1, 2026 17:44
- Initial commit
- 优化金价数据获取和处理逻辑,增强错误处理,更新类型检查设置
- Initial commit
- 优化金价数据获取和处理逻辑,增强错误处理,更新类型检查设置
- 优化应用加载逻辑,增强 ZTools 环境支持,调整样式以改善布局

@fantasy-ke fantasy-ke left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

- Initial commit
- 优化金价数据获取和处理逻辑,增强错误处理,更新类型检查设置
- 优化应用加载逻辑,增强 ZTools 环境支持,调整样式以改善布局
- 新增历年均价对比功能,优化数据获取逻辑,更新数据结构和接口
@lzx8589561 lzx8589561 merged commit 24cc74f into ZToolsCenter:main Jul 4, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants