Skip to content

Commit

Permalink
Merge pull request #22 from FantasyRL/not_main
Browse files Browse the repository at this point in the history
add: name field in StudentDetail
  • Loading branch information
FantasyRL authored Jan 17, 2025
2 parents 5898c0e + 0501b84 commit 97173a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions model.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ type Student struct {

// 学生信息详情
type StudentDetail struct {
Name string `json:"name"` // 姓名
Sex string `json:"sex"` // 性别
Birthday string `json:"birthday"` // 出生日期
Phone string `json:"phont"` // 手机号
Expand Down
1 change: 1 addition & 0 deletions user.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ func (s *Student) GetInfo() (resp *StudentDetail, err error) {
}

resp = &StudentDetail{
Name: safeExtractHTMLFirst(res, `//*[@id="ContentPlaceHolder1_LB_xm"]`),
Birthday: safeExtractHTMLFirst(res, `//*[@id="ContentPlaceHolder1_LB_csrq"]`),
Sex: safeExtractHTMLFirst(res, `//*[@id="ContentPlaceHolder1_LB_xb"]`),
Phone: safeExtractHTMLFirst(res, `//*[@id="ContentPlaceHolder1_LB_lxdh"]`),
Expand Down

0 comments on commit 97173a3

Please sign in to comment.