Update API endpoints and enhance UI components. Changed appid in manifest.json, modified profile and log update methods from PUT to POST in profile.js and smoke.js, respectively. Added new statistics retrieval function in smoke.js and improved the smoke record dialog with updated styles and validation logic. Updated configuration for development environment and refined documentation for health recovery and savings calculations.

This commit is contained in:
nepiedg
2026-01-26 22:16:20 +08:00
parent 35405efcdf
commit 0d482e3a1c
11 changed files with 1103 additions and 509 deletions
+9 -3
View File
@@ -202,7 +202,9 @@ function calculateDailyTarget(baseline, stage, dayInStage) {
---
## 5. 健康恢复计算
## 5. 健康恢复计算(后端统一)
接口:`GET /api/v1/smoke/stats?range=week|month|year`(详见 `docs/smoke/API.md`
基于医学研究的恢复时间线:
@@ -236,7 +238,9 @@ function calculateLungRecovery(smokeFreeMinutes) {
---
## 6. 省钱计算
## 6. 省钱计算(后端统一)
接口:`GET /api/v1/smoke/stats?range=week|month|year`(详见 `docs/smoke/API.md`
```javascript
// utils/money.js
@@ -250,7 +254,9 @@ function calculateMoneySaved(packPriceCent, cigsPerPack, baselineCigsPerDay, act
---
## 7. 激励语生成
## 7. 激励语生成(后端统一)
接口:`GET /api/v1/smoke/motivation`(详见 `docs/smoke/API.md`
根据用户状态生成不同的激励语: