# 校园论坛app开发 **Repository Path**: czyily/campus-forum-app-development ## Basic Information - **Project Name**: 校园论坛app开发 - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-06 - **Last Updated**: 2026-10-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Campus Forum App (学生互) 一个基于 Spring Boot 后端和 UniApp 前端的校园论坛移动应用。 ## 项目简介 Campus Forum App(学生互)是一个面向大学生的校园社交论坛平台,支持帖子发布、评论、点赞、关注等功能。应用采用前后端分离架构,后端使用 Spring Boot + MyBatis,前端使用 UniApp 开发,可编译生成 Android 和 iOS 应用。 ## 技术栈 ### 后端 (student_hu) - **框架**: Spring Boot - **数据库**: MySQL + MyBatis - **接口风格**: RESTful API - **主要功能模块**: - 用户认证与信息管理 - 帖子发布与浏览 - 评论系统 - 点赞功能(帖子/评论) - 用户关注 - 文件上传 ### 前端 (student_hu_ui) - **框架**: UniApp (Vue.js) - **目标平台**: Android / iOS / H5 - **主要页面**: - 登录/注册 - 首页(帖子列表) - 帖子详情 - 发布帖子 - 个人中心 - 我的帖子 - 校园地图 - 设置 ## 功能特性 - 用户注册登录 - 浏览帖子列表(最新/热门) - 发布图文帖子 - 评论帖子 - 点赞帖子和评论 - 关注/粉丝系统 - 个人主页和资料编辑 - 校园地图(建筑导航) - 图片上传 ## 项目结构 ``` campus-forum-app-development/ ├── student_hu/ # Spring Boot 后端项目 │ ├── src/main/java/ # Java 源代码 │ │ └── com/example/student_hu/ │ │ ├── Controller/ # 控制器层 │ │ ├── Service/ # 业务逻辑层 │ │ ├── Dao/ # 数据访问层 │ │ └── Service/Mapper/# MyBatis Mapper 接口 │ ├── src/main/resources/ # 配置文件和 Mapper XML │ └── pom.xml # Maven 依赖配置 │ └── student_hu_ui/ # UniApp 前端项目 ├── pages/ # 页面组件 ├── api/ # API 接口封装 ├── utils/ # 工具函数 └── static/ # 静态资源 ``` ## 环境要求 ### 后端 - JDK 1.8+ - Maven 3.6+ - MySQL 5.7+ ### 前端 - Node.js 14+ - HBuilderX(UniApp 推荐 IDE) ## 快速开始 ### 后端配置 1. 导入数据库脚本 `student_hu.sql` 2. 修改配置文件 `src/main/resources/application.properties`: ```properties spring.datasource.url=jdbc:mysql://localhost:3306/your_database spring.datasource.username=your_username spring.datasource.password=your_password ``` 3. 启动后端服务: ```bash cd student_hu ./mvnw spring-boot:run ``` 后端服务默认运行在 `http://localhost:8080` ### 前端配置 1. 安装依赖: ```bash cd student_hu_ui npm install ``` 2. 修改 API 地址(如需要): 编辑 `utils/request.js` 和 `utils/upLoadFile.js` 中的 `BASE_URL` 3. 运行项目: - 使用 HBuilderX 打开项目运行 - 或使用命令行: `npm run dev` ## 编译打包 ### Android APK 在 HBuilderX 中: 运行 -> 运行到手机或模拟器 -> 制作调试包 或在 `student_hu_ui/unpackage/release/apk/` 目录下已存在编译好的 APK 文件 ## API 接口文档 | 接口路径 | 方法 | 说明 | |---------|------|------| | `/index/login` | POST | 用户登录 | | `/index/insert` | POST | 用户注册 | | `/post/list/{stuid}` | GET | 获取帖子列表 | | `/post/hotlist/{stuid}` | GET | 获取热门帖子 | | `/post/add` | POST | 发布帖子 | | `/post/delete` | POST | 删除帖子 | | `/comment/addComment` | POST | 添加评论 | | `/like_con/like` | POST | 点赞 | | `/like_con/unlike` | POST | 取消点赞 | | `/follow/addFollow` | POST | 关注用户 | | `/api/upload` | POST | 文件上传 | ## 许可证 本项目仅供学习交流使用。 ## 贡献者 感谢为本项目贡献代码的开发者们。