Files
cryptocoin/README.md
2026-06-23 21:57:39 +08:00

57 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# CryptoCoin
Windows 桌面迷你行情挂件Tauri 2 + 币安 24hr API
## 设置文件(重要)
配置保存在 **与 `CryptoCoin.exe` 同级**`data` 文件夹:
```
D:\WindowsApp\CryptoCoin\data\settings.json
```
(便携安装;开发时则在 `target\debug\data\` 等目录。)
首次从旧版 `%APPDATA%\com.smy.cryptocoin\` 升级时会自动迁移 `settings.json``data`
可将项目内 `src-tauri/settings.json` 复制为 `data\settings.json` 模板。托盘 **打开设置目录** 会打开 `data` 文件夹。
示例:
```json
{
"enabled": ["BTCUSDT", "ETHUSDT"],
"proxyBaseUrl": "https://bn-api-proxy.smyhub.com",
"useProxy": true,
"refreshIntervalMs": 5000,
"backgroundTheme": "dark"
}
```
`backgroundTheme` 可选:`dark``slate``navy``charcoal``midnight``forest``light`;也可在托盘 **背景颜色** 中切换。
- `useProxy: true``proxyBaseUrl` 非空 → 走代理
- `useProxy: false` → 直连(`proxyBaseUrl` 仍保留,便于下次切回代理)
- `refreshIntervalMs` 最小 **3000**(托盘从 3 秒起,避免 API 限流)
## 开发
```bash
npm install
npm run tauri dev
```
## 发布安装包
修改代码后需重新打包,旧 exe 不会包含新逻辑:
```bash
npm run tauri build
```
安装包:`src-tauri/target/release/bundle/nsis/CryptoCoin_*_x64-setup.exe`
## 代理 Worker
见 [cryptocoin-binance-proxy/README.md](cryptocoin-binance-proxy/README.md)。