-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
52 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# CampuxBot | ||
|
||
> 代码仓库:https://github.com/idoknow/CampuxBot | ||
CampuxBot 的 QQ 机器人模块基于[NoneBot2](https://nonebot.dev/)构建。 | ||
|
||
启动机器人: | ||
|
||
```bash | ||
python main.go | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,43 @@ | ||
# Campux 前后端 | ||
|
||
具体细节请见[Campux仓库](https://github.com/idoknow/Campux) | ||
## 资源 | ||
|
||
## 接口文档 | ||
- 代码仓库:https://github.com/idoknow/Campux | ||
- 接口文档:https://apifox.com/apidoc/shared-463342af-a8a6-4839-b175-9042d59dd6d1 | ||
|
||
https://apifox.com/apidoc/shared-463342af-a8a6-4839-b175-9042d59dd6d1 | ||
|
||
## 后端 | ||
|
||
代码位于 `backend` 目录下,启动文件为根目录`main.go`。 | ||
|
||
```bash | ||
go run main.go | ||
``` | ||
|
||
## 前端 | ||
|
||
位于 `frontend` 目录下。 | ||
|
||
|
||
```bash | ||
#安装依赖 | ||
npm install | ||
``` | ||
|
||
需要先部署一个测试后端,然后修改 `frontend/src/store/index.js` 中的 `base_url` 为测试后端地址。 | ||
这种模式下,启动的前端和后端不在同一个域,但后端在调试模式下允许跨域,故可以正常使用接口。 | ||
但 Cookies 不能正常被前端 JS 修改,故无法进行退出操作。 | ||
|
||
|
||
```bash | ||
# 启动前端调试 | ||
npm run dev | ||
``` | ||
|
||
如果需要嵌入到后端,需要先构建前端代码: | ||
|
||
```bash | ||
npm run build | ||
``` | ||
|
||
此时启动后端,访问非`/v1`开头的路径,后端将发送`frontend/dist/`目录下对应文件。 |