Giter Club home page Giter Club logo

westudy's Introduction

WeStudy

Node.js CI

一、项目介绍

软件用户类别

该软件定位于需要自主学习的但在学习中遇到问题又难以及时找到同伴交流的大学生群体。

开发目的

当下大学生在学习方面普遍感到孤单,缺少同学共同交流。部分乐于助人的同学也缺少提供帮助或者分享笔记的机会。该软件提供交流以及答疑的渠道,而不至于因为打开其他社交软件而浪费时间。

同时,图书馆自习室座位常需要同学自己寻找,并花费大量时间寻找座位。即使如此,他们也很难找到满意的位置。通过该软件,可以将图书馆自习室划分为不同模块,使得学习内容相近或者自习需求相似的同学坐在一起,初步计划按照学科分区或按照专业分区。

功能

1、图书馆自习室空闲座位实时显示与预约:座位分为预约中、使用中、空闲三种情况,每天0:00开放当天预约通道,预约时间段分为上午中午晚上,预约后需要在指定时间段到预约座位扫码打卡,若超出预约时间仍未打卡,则座位自动恢复空闲状态,供其他同学预约学习。同学使用完座位之后,在软件上面选择离开,座位恢复空闲状态。

2、信用分管理机制,对预约而不到的以及走后不手动解除占用的人进行扣分,连续暗示学习和签退的进行加分,分数过低的人,其预约操作将延迟生效

3、定位签到。我们会根据使用者的地理位置来进行签到,判断其是否使用座位。

二、项目构建方法

构建

git clone https://github.com/SJTU-IS-SE-01/westudy.git
cd westudy
npm install

routes文件下添加数据库服务器和邮箱服务器的配置文件,mysql.jsonemail.json

如果您不清楚,请联系开发者。

运行

npm start

测试

npm test
  • 语法、代码风格检查
npm run test-syntax
  • 后端API测试
npm run test-backend
  • 前端测试
npm run test-frontend

三、项目开发流程

请发起pull requsets

四、API文档

查询某时间段座位是否被占用

url: /api/seatcheck/:id/:Btime/:Etime

method: http get

参数名 类型 必填 说明
id char 座位号
Btime DATETIME 查询时间段的开始时间
Etime DATETIME 查询时间段的结束时间

返回正确JSON示例

{
  "status": 0,
  "msg": "0",
  "results": 1,
}

返回错误JSON示例

{
  "status": 1,
  "msg": "0",
  "results": 1,
}
{
  "status": 1,
  "msg": "Btime>Etime",
  "results": {},
}

查询学生信息

url: /api/students/query

method: http get

参数名 类型 必填 说明
Id varchar 学号
Name varchar 姓名
Major varchar 专业
Credit int 信誉分
email varchar 邮箱

返回正确JSON示例

{ 
  "status": 0,
  "msg": "ok",
  "results": {},
}

返回错误JSON示例

{
  "status": 1,
  "msg": "error",
  "results": {},
 }

修改信誉分

url: /api/students/quary

method: http post

参数名 类型 必填 说明
Id varchar 学号
Credit int 信誉分

返回正确JSON示例

{ 
  "status": 0,
  "msg": "ok",
  "results": {},
}

返回错误JSON示例

{
  "status": 1,
  "msg": "error",
  "results": {},
}

增加座位预约

url: /api/students/addappointment

method: http post

参数名 类型 必填 说明
Btime DATETIME 开始时间
Etime DATETIME 结束时间
Snum char 座位号

返回正确JSON示例

{ 

  "status": 0,
  "msg": "ok",
  "results": {},
}

返回错误JSON示例

{
  "status": 1,
  "msg": "error",
  "results": {},
}

查询座位预约信息

url: /api/students/seatsapt

method: http get

参数 类型 必填 说明
Btime DATETIME 开始时间
Etime DATETIME 结束时间
Snum char 座位号
ID varchar 学号

返回正确JSON示例

{  
  "status": 0,    
  "msg": "ok",
  "results": {},
}

返回错误JSON示例

{   
  "status": 1,
  "msg": "error", 
  "results": {},
}
查询某个楼层区域的座位信息

url:api/seats/query

method:http get

参数 类型 必填 说明
Subject varchar 学科
Snum char 编号
Area char 区域
Floor char 楼层

返回正确JSON示例

{ 

   status: 0,
    msg: 'ok',
    results: {},


}

返回错误JSON示例

{

   status: 1,
    msg: 'error',
    results: {},

}

登陆(获取验证码)

url: /api/login/code

method: http post

参数 类型 必填 说明
email varchar 邮箱

返回正确JSON示例

{  
  "status": 0,    
  "msg": "ok",
  "results": {},
}

返回错误JSON示例

{   
  "status": 1,
  "msg": "error", 
  "results": {},
}

登陆

url: /api/login

method: http post

参数 类型 必填 说明
email varchar 邮箱
code varchar 验证码

返回正确JSON示例

{  
  "status": 0,    
  "msg": "ok",
  "results": {},
}

返回错误JSON示例

{   
  "status": 1,
  "msg": "err", 
  "results": "code is not correct.",
}

westudy's People

Contributors

kelo007 avatar qnzzzz avatar johnwilson614 avatar leishilin avatar xietianmin avatar heyflying avatar gemini126 avatar tay-tay-tay avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.