Documentation
¶
Index ¶
- Constants
- type CaptchaBody
- type CoinStatus
- type CourseScore
- type CreditRequire
- type JwSession
- func (session *JwSession) CanRetake(classCode string) (bool, error)
- func (session *JwSession) Do(f func(req *fasthttp.Request, resp *fasthttp.Response))
- func (session *JwSession) GetCoinStatus(year, semester int) (*CoinStatus, error)
- func (session *JwSession) GetCreditRequire() ([]CreditRequire, error)
- func (session *JwSession) GetHtmlStuCourse(year, semester int) (string, error)
- func (session *JwSession) GetInfo() (*Student, error)
- func (session *JwSession) GetKeyParam() (*KeyParam, error)
- func (session *JwSession) GetScores() ([]CourseScore, error)
- func (session *JwSession) GetStuCourse(year, semester int) ([]StuCourse, error)
- func (session *JwSession) Login(userCode, passWord string) (bool, error)
- func (session *JwSession) Validate() bool
- type KeyParam
- type Specialty
- type StuCourse
- type Student
Constants ¶
View Source
const ( // 主机 JwHost = "http://jwgl.ouc.edu.cn" // 数据页 DataTable = JwHost + "/taglib/DataTable.jsp" // 登录 Login = JwHost + "/cas/logon.action" // 验证码 Captcha = JwHost + "/cas/genValidateCode" // 检查会话有效性 OnlineMessage = JwHost + "/online/message" // 获取所有学科的专业的列表 SpecialtyList = JwHost + "/frame/droplist/getDropLists.action" // 获取指定年级的专业信息 GradeSpeciality = JwHost + "/jw/common/getStuGradeSpeciatyInfo.action" // 获取二维形式的课表 HtmlTimeTable = JwHost + "/student/wsxk.zx.bykb.jsp" // 获取学生选课币使用情况 Coin = JwHost + "/jw/common/getSelectLessonPointsInfo.action" // 检测是否可以重修某一门课 RepeatCourse = JwHost + "/jw/common/isRepeatCourse.action" // 选课 SaveCourse = JwHost + "/jw/common/saveElectiveCourse.action" // 选课前检验是否具有资格的接口 ConfirmSelectable = JwHost + "/jw/common/isSelectableSkbjdm.action" // 删除已选课程 CancelCourse = JwHost + "/jw/common/cancelElectiveCourse.action" // 加密参数接口 KeyTimeParam = JwHost + "/custom/js/SetKingoEncypt.jsp" // 获取成绩接口 Score = JwHost + "/student/xscj.stuckcj_data.jsp" )
View Source
const RecognizeURL = "https://itstudio.club/ocr/jw"
识别验证码的接口
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CaptchaBody ¶
type CaptchaBody struct {
SpendTime int `json:"spend_time(ms)"` // 识别耗费的时间 毫秒
TimeStamp string `json:"Time"` // 时间戳
Value string `json:"value"` // 识别值
}
识别接口返回的body
type CoinStatus ¶
type CourseScore ¶
type CreditRequire ¶
毕业学分要求
type JwSession ¶
type JwSession struct {
UserCode string `json:"UserCode"` // 学号
PassWord string `json:"password"` // 密码
JSESSIONID string `json:"j_session_id"` // 教务会话ID
}
教务会话
func (*JwSession) GetCoinStatus ¶
func (session *JwSession) GetCoinStatus(year, semester int) (*CoinStatus, error)
获取指定学年学期的选课币使用情况
func (*JwSession) GetCreditRequire ¶
func (session *JwSession) GetCreditRequire() ([]CreditRequire, error)
获取毕业要求的每类课程所需的学分
func (*JwSession) GetHtmlStuCourse ¶
获取二维html格式课程表
func (*JwSession) GetScores ¶
func (session *JwSession) GetScores() ([]CourseScore, error)
func (*JwSession) GetStuCourse ¶
根据学年、学期获得该学年、学期的选课记录
Click to show internal directories.
Click to hide internal directories.