qczj

package module
v0.0.0-...-1f8e72e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccessToken

func AccessToken(openId, nickName, headImg string) (string, error)

Types

type CurrentCourse

type CurrentCourse struct {
	Id         string `json:"id"`
	Pid        string `json:"pid"`
	Type       string `json:"type"`
	StartTime  string `json:"startTime"`
	EndTime    string `json:"endTime"`
	Title      string `json:"title"`
	Cover      string `json:"cover"`
	UriType    string `json:"uriType"`
	Uri        string `json:"uri"`
	Content    string `json:"content"`
	Status     string `json:"s"` // status
	Creator    string `json:"creator"`
	CreateTime string `json:"createTime"`
	Users      string `json:"users"`
	ClickTimes string `json:"clickTimes"`
	IsTop      string `json:"isTop"`
}

func Current

func Current(accessToken string) (*CurrentCourse, error)

Current 获取用户当前课程

type CurrentCourseResp

type CurrentCourseResp struct {
	Status  int           `json:"status"`
	Message string        `json:"message"`
	Result  CurrentCourse `json:"result"`
}

type LastInfoDetail

type LastInfoDetail struct {
	Nid    string         `json:"nid"`
	CardNo string         `json:"cardNo"`
	SubOrg string         `json:"subOrg"`
	Nodes  []LastInfoNode `json:"nodes"`
}

func LastInfo

func LastInfo(accessToken string) (*LastInfoDetail, error)

LastInfo 获取上一次填报的信息

type LastInfoNode

type LastInfoNode struct {
	Id    string      `json:"id"`
	Title string      `json:"title"`
	Type  interface{} `json:"type"` // 看起来用不上
}

type LastInfoResp

type LastInfoResp struct {
	Status  int            `json:"status"`
	Message string         `json:"message"`
	Result  LastInfoDetail `json:"result"`
}

type SignInRecordResp

type SignInRecordResp struct {
	Status  int      `json:"status"`
	Message string   `json:"message"`
	Result  []string `json:"result"`
}

func SignInRecord

func SignInRecord(accessToken, date string) (*SignInRecordResp, error)

SignInRecord 获取指定月份签到记录 date的格式2006-01 result是时间数组格式为2006-01-02

type SignInResp

type SignInResp struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
	Result  bool   `json:"result"`
}

func SignIn

func SignIn(accessToken string) (*SignInResp, error)

SignIn resp中result为true时表示当天已打卡且当此打卡成功

type StudyRecordsResp

type StudyRecordsResp struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
	Result  struct {
		List []struct {
			Id    string `json:"id"`
			Title string `json:"title"`
			List  []struct {
				Id         string      `json:"id"`
				CreateTime string      `json:"createTime"`
				CardNo     string      `json:"cardNo"`
				SubOrg     interface{} `json:"subOrg"`
				Nid        string      `json:"nid"`
			} `json:"list"`
		} `json:"list"`
		PagedInfo struct {
			PageSize int    `json:"pageSize"`
			PageNum  int    `json:"pageNum"`
			Total    string `json:"total"`
		} `json:"pagedInfo"`
	} `json:"result"`
}

func StudyRecords

func StudyRecords(accessToken string, pageSize, pageNum uint, desc ...string) (*StudyRecordsResp, error)

type StudyResp

type StudyResp struct {
	Status  int    `json:"status"`
	Message string `json:"message"`
	Result  struct {
		Openid     string `json:"openid"`
		SubOrg     string `json:"subOrg"`
		CardNo     string `json:"cardNo"`
		Id         string `json:"id"`
		UserIp     string `json:"userIp"`
		Nid        string `json:"nid"`
		CreateTime string `json:"createTime"`
	} `json:"result"`
	Debug interface{} `json:"debug"`
}

func Study

func Study(accessToken, cardNo, course, nid string) (*StudyResp, error)

Study cardNo:学号或姓名 course:课程id nid:组织id

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL