From e5251947292fff1d983941426aeb16b599b1de5c Mon Sep 17 00:00:00 2001 From: gitee-bot Date: Tue, 3 Mar 2026 06:12:21 +0000 Subject: [PATCH] Add README.md --- README.en.md | 82 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 166 insertions(+) create mode 100644 README.en.md create mode 100644 README.md diff --git a/README.en.md b/README.en.md new file mode 100644 index 0000000..0f55837 --- /dev/null +++ b/README.en.md @@ -0,0 +1,82 @@ +# Weight Tracking Mini Program + +A weight tracking mini program based on WeChat Cloud Development, helping users easily track and manage weight data. + +## Features + +- **Weight Logging**: Quickly record daily weight data +- **Data Visualization**: Intuitively view weight trend patterns +- **Cloud Storage**: Utilizes WeChat Cloud Development for secure and reliable data storage +- **Cloud Function Support**: Backend logic is handled via cloud functions + +## Technology Stack + +- **Frontend**: WeChat Mini Program +- **Backend**: WeChat Cloud Development +- **Database**: Cloud Database (CloudBase Database) +- **Cloud Functions**: Node.js Cloud Functions +- **Dependencies**: + - `@cloudbase/node-sdk`: Cloud Development Node.js SDK + - `@cloudbase/database`: Cloud Database SDK + - `lodash`: JavaScript utility library + +## Project Structure + +``` +├── cloudfunctions/ +│ └── record/ # Weight recording cloud function +│ ├── index.js # Cloud function entry point +│ └── node_modules/ # Cloud function dependencies +├── .vscode/ +│ └── settings.json # VSCode configuration +└── LICENSE # Project license +``` + +## Cloud Function Description + +### record Cloud Function + +Handles weight data recording and storage. + +- **Location**: `cloudfunctions/record/index.js` +- **Functionality**: + - Receives and processes weight recording requests + - Stores data in the cloud database + +## Installation and Deployment + +### Prerequisites + +1. WeChat Developer Tool +2. WeChat Mini Program AppID +3. Cloud Development enabled + +### Deployment Steps + +1. **Create a Cloud Development Environment** + - Create a cloud development environment in the WeChat Developer Tool + - Obtain the environment ID + +2. **Upload Cloud Functions** + - Right-click the `cloudfunctions/record` directory in the WeChat Developer Tool + - Select "Upload and Deploy: Install Dependencies in Cloud" + +3. **Initialize Database** + - Create a data collection in the Cloud Development Console (e.g., `weight_records`) + +## Usage Instructions + +1. Open the mini program +2. Enter your current weight +3. Click the save button +4. View historical records and weight trends + +## License + +MIT License + +## Notes + +- Ensure the cloud development environment ID is correctly configured +- Cloud function dependencies are automatically installed during deployment +- It is recommended to regularly back up important data \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..399b7e8 --- /dev/null +++ b/README.md @@ -0,0 +1,84 @@ + + +# 体重记录小程序 + +一款基于微信云开发的体重记录小程序,帮助用户轻松追踪和管理体重数据。 + +## 功能特点 + +- **体重记录**:快速记录每日体重数据 +- **数据可视化**:直观查看体重变化趋势 +- **云端存储**:使用微信云开发,数据安全可靠 +- **云函数支持**:后端逻辑通过云函数处理 + +## 技术栈 + +- **前端**:微信小程序 (Mini Program) +- **后端**:微信云开发 (WeChat Cloud Development) +- **数据库**:云数据库 (CloudBase Database) +- **云函数**:Node.js 云函数 +- **依赖**: + - `@cloudbase/node-sdk`:云开发 Node.js SDK + - `@cloudbase/database`:云数据库 SDK + - `lodash`:JavaScript 实用工具库 + +## 项目结构 + +``` +├── cloudfunctions/ +│ └── record/ # 体重记录云函数 +│ ├── index.js # 云函数入口 +│ └── node_modules/ # 云函数依赖 +├── .vscode/ +│ └── settings.json # VSCode 配置 +└── LICENSE # 项目许可证 +``` + +## 云函数说明 + +### record 云函数 + +负责处理体重数据的记录和存储。 + +- **位置**:`cloudfunctions/record/index.js` +- **功能**: + - 接收并处理体重记录请求 + - 存储数据到云数据库 + +## 安装部署 + +### 前置条件 + +1. 微信开发者工具 +2. 微信小程序 AppID +3. 开通云开发功能 + +### 部署步骤 + +1. **创建云开发环境** + - 在微信开发者工具中创建云开发环境 + - 获取环境 ID + +2. **上传云函数** + - 在微信开发者工具中右键点击 `cloudfunctions/record` 目录 + - 选择 "上传并部署:云端安装依赖" + +3. **初始化数据库** + - 在云开发控制台创建数据集合(如 `weight_records`) + +## 使用说明 + +1. 打开小程序 +2. 输入当前体重 +3. 点击保存按钮 +4. 查看历史记录和体重趋势 + +## 许可证 + +MIT License + +## 注意事项 + +- 请确保已正确配置云开发环境 ID +- 云函数依赖会在部署时自动安装 +- 建议定期备份重要数据 \ No newline at end of file -- Gitee