|
|
|
@ -1,70 +1,81 @@
|
|
|
|
|
# README
|
|
|
|
|
https://www.trustie.net/issues/24719
|
|
|
|
|
[云上实验室] Logo、导航、底部备案信息定制化
|
|
|
|
|
This README would normally document whatever steps are necessary to get the
|
|
|
|
|
application up and running.
|
|
|
|
|
|
|
|
|
|
Things you may want to cover:
|
|
|
|
|
|
|
|
|
|
* Ruby version
|
|
|
|
|
|
|
|
|
|
* System dependencies
|
|
|
|
|
|
|
|
|
|
* Configuration
|
|
|
|
|
|
|
|
|
|
* Database creation
|
|
|
|
|
|
|
|
|
|
* Database initialization
|
|
|
|
|
|
|
|
|
|
* How to run the test suite
|
|
|
|
|
|
|
|
|
|
* Services (job queues, cache servers, search engines, etc.)
|
|
|
|
|
|
|
|
|
|
* Deployment instructions
|
|
|
|
|
|
|
|
|
|
* ...
|
|
|
|
|
#### Jbuilder介绍
|
|
|
|
|
Jbuilder: https://github.com/rails/jbuilder
|
|
|
|
|
|
|
|
|
|
#### Rails5 介绍
|
|
|
|
|
rails guide: https://ruby-china.github.io/rails-guides/v5.0/
|
|
|
|
|
|
|
|
|
|
#### API设计文档
|
|
|
|
|
doc for api: https://www.showdoc.cc/web/#/127895880302646?page_id=729221359592009
|
|
|
|
|
user:Hjqreturn PW:12345678
|
|
|
|
|
|
|
|
|
|
#### 测试版访问地址:https://testeduplus2.educoder.net
|
|
|
|
|
|
|
|
|
|
#### 实训平台繁忙
|
|
|
|
|
仓库异常:繁忙等级(81)
|
|
|
|
|
|
|
|
|
|
#### 新版域名跳转规则
|
|
|
|
|
新版域名要求总结:testeduplus2.educoder.net/(主要提供实训、实训课堂等业务)
|
|
|
|
|
目前有两个域名testbdweb.educoder.net(老版:主要提供课堂、项目、个人主页、后台等服务)
|
|
|
|
|
|
|
|
|
|
要求:
|
|
|
|
|
1、两服务域名都应该启动‘提供服务
|
|
|
|
|
|
|
|
|
|
2、如果请求链接包含以下的形式,则域名跳至testeduplus2.educoder.net
|
|
|
|
|
testeduplus2.educoder.net/shixuns
|
|
|
|
|
testeduplus2.educoder.net/shixuns/*
|
|
|
|
|
testeduplus2.educoder.net/paths
|
|
|
|
|
testeduplus2.educoder.net/paths/*
|
|
|
|
|
testeduplus2.educoder.net/myshixuns/
|
|
|
|
|
testeduplus2.educoder.net/tasks/*
|
|
|
|
|
testeduplus2.educoder.net/games/*
|
|
|
|
|
|
|
|
|
|
如果不满足上述需求的,域名全部跳转至testbdweb.educoder.net
|
|
|
|
|
比如:门户首页,如果访问:testeduplus2.educoder.net 应为没包含上述链接。则调制testbdweb.educoder.net
|
|
|
|
|
在比如:testeduplus2.educoder.net /users/Hjqreturn没包含上述规则,则跳转到testbdweb.educoder.net/users/Hjqreturn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 需要重构user_extensions 相关sql语句的地方标记 REDO:Extention
|
|
|
|
|
|
|
|
|
|
# 文件上传:ActiveStorage
|
|
|
|
|
# 新能:bootsnap
|
|
|
|
|
|
|
|
|
|
# 注意事项:
|
|
|
|
|
# 第一次部署需要执行一些rake任务
|
|
|
|
|
# 配置redis地址
|
|
|
|
|
# 配置gitlab/intializers/gitlab_config.yml
|
|
|
|
|
# API文档
|
|
|
|
|
---
|
|
|
|
|
## 基本介绍
|
|
|
|
|
|
|
|
|
|
开发API服务地址:
|
|
|
|
|
|
|
|
|
|
http://120.27.155.180:3000/
|
|
|
|
|
|
|
|
|
|
邮箱/密码:25012034@qq.com/11111111
|
|
|
|
|
|
|
|
|
|
**Applications**
|
|
|
|
|
- iOS
|
|
|
|
|
Application Id:
|
|
|
|
|
```
|
|
|
|
|
f2ac514ff9c4630d9509a5f361362eb52b28e36396bd92cefcdafe8dee1055c5
|
|
|
|
|
```
|
|
|
|
|
Secret:
|
|
|
|
|
```
|
|
|
|
|
77c88ef325b2c557d8d7699694882ae73876bf1fe18554c119865bddb364c0d8
|
|
|
|
|
```
|
|
|
|
|
- Android
|
|
|
|
|
|
|
|
|
|
Application Id:
|
|
|
|
|
```
|
|
|
|
|
1be5ac17e050d515a11b99bc16c445ab114c8f3513e59175b106bba1f746ea5e
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Secret:
|
|
|
|
|
```
|
|
|
|
|
ec0bb068cf24a15389a6753da6d52c36c764a13d9913a97d14be6c9c6925255e
|
|
|
|
|
```
|
|
|
|
|
### API接口
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
#### 用户注册(通过其他平台)
|
|
|
|
|
```
|
|
|
|
|
POST accounts/remote_register
|
|
|
|
|
```
|
|
|
|
|
*示例*
|
|
|
|
|
```
|
|
|
|
|
curl -X POST \
|
|
|
|
|
-d "email=2123233122@qq.com" \
|
|
|
|
|
-d "password=djs_D_00001" \
|
|
|
|
|
-d "phone=18816365620" \
|
|
|
|
|
-d "platform=forge" \
|
|
|
|
|
http://localhost:3000/api/accounts/remote_register | jq
|
|
|
|
|
```
|
|
|
|
|
请求参数说明:
|
|
|
|
|
|
|
|
|
|
email(requires): 用户邮箱
|
|
|
|
|
|
|
|
|
|
phone(requires): 手机号
|
|
|
|
|
|
|
|
|
|
password(requires): 密码
|
|
|
|
|
|
|
|
|
|
platform(optional):用户来源的相关平台,取值范围['educoder', 'trustie', 'forge'],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
返回参数说明:
|
|
|
|
|
|
|
|
|
|
status: 响应状态码,0:请求成功,-1: 请求失败
|
|
|
|
|
|
|
|
|
|
message: 响应说明
|
|
|
|
|
|
|
|
|
|
id: 用户id
|
|
|
|
|
|
|
|
|
|
token: 用户对应token,唯一
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
返回值
|
|
|
|
|
```
|
|
|
|
|
{
|
|
|
|
|
"status": 0,
|
|
|
|
|
"message": "success",
|
|
|
|
|
"user": {
|
|
|
|
|
"id": 36400,
|
|
|
|
|
"token": "8c87a80d9cfacc92fcb2451845104f35119eda96"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
```
|
|
|
|
|
---
|
|
|
|
|