mirror of
https://github.com/shufflewzc/faker2.git
synced 2025-04-23 02:48:44 +08:00
Update jd_tanwei.js
This commit is contained in:
parent
79f7d0a292
commit
f1099958bf
@ -63,10 +63,12 @@ async function twqyj() {
|
||||
let tk = await queryInteractiveInfo();
|
||||
for (let key of Object.keys(tk.assignmentList).reverse()){
|
||||
let vo = tk.assignmentList[key]
|
||||
if (vo.completionFlag || vo.assignmentType == 30) {
|
||||
if (vo.completionFlag && vo.assignmentType != 30) {
|
||||
console.log('此任务已完成')
|
||||
} else if (new Date(vo.assignmentStartTime).getTime() > Date.now()) {
|
||||
console.log('此任务还没到开放时间:',vo.assignmentStartTime)
|
||||
} else if (vo.assignmentType == 30) {
|
||||
await dotask(encryptProjectId,vo.encryptAssignmentId,{"ext":{"exchangeNum":1}})
|
||||
} else {
|
||||
if (vo.ext && vo.ext.extraType == 'sign1') {
|
||||
await sign(encryptProjectId,vo.encryptAssignmentId)
|
||||
@ -133,9 +135,10 @@ async function sign(encryptProjectId, AssignmentId) {
|
||||
})
|
||||
}
|
||||
|
||||
async function dotask(encryptProjectId, AssignmentId) {
|
||||
async function dotask(encryptProjectId, AssignmentId, body1 = {}) {
|
||||
let body = { "encryptProjectId": encryptProjectId, "encryptAssignmentId": AssignmentId, "sourceCode": "acemsg0406", "completionFlag": true,...body1}
|
||||
return new Promise(async (resolve) => {
|
||||
$.post(taskUrl("doInteractiveAssignment", { "encryptProjectId": encryptProjectId, "encryptAssignmentId": AssignmentId, "sourceCode": "acemsg0406", "completionFlag": true }), async (err, resp, data) => {
|
||||
$.post(taskUrl("doInteractiveAssignment", body), async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
|
Loading…
Reference in New Issue
Block a user