Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
fix: handle leave sign tasks
Browse files Browse the repository at this point in the history
closes #28
  • Loading branch information
beetcb committed May 2, 2021
1 parent 50a344b commit d497c7d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions campusphere/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ exports.signApp = class signApp extends campusphereApp {
const signQ = await res.json()
const isValidCookie = signQ.message === 'SUCCESS'
if (isValidCookie) {
this.curTask = signQ.datas.unSignedTasks[0]
const data = signQ.datas
this.curTask = data.unSignedTasks[0] || data.leaveTasks[0]
return false
}
return true
Expand All @@ -79,7 +80,6 @@ exports.signApp = class signApp extends campusphereApp {
extraField,
longitude,
latitude,
isMalposition,
signPlaceSelected,
isNeedExtra,
signedStuInfo,
Expand All @@ -95,13 +95,13 @@ exports.signApp = class signApp extends campusphereApp {
signInstanceWid,
longitude,
latitude,
isNeedExtra,
extraFieldItems,
isMalposition: isSignAtHome ? 1 : 0,
abnormalReason: '',
signPhotoUrl: '',
position: this.addr,
uaIsCpadaily: true,
isNeedExtra,
extraFieldItems,
signVersion: '1.0.0',
}

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@beetcb/cea",
"version": "2.1.14",
"version": "2.1.15",
"description": "campusphere-elegant-auth: login to swms/campusphere at ease",
"main": "dist/index.js",
"bin": "dist/cli.js",
Expand Down

0 comments on commit d497c7d

Please sign in to comment.