mirror of
https://github.com/chinnkarahoi/jd_scripts.git
synced 2024-06-05 19:32:47 +08:00
修复冲突
This commit is contained in:
parent
cb0dd97cec
commit
2db6e321a0
@ -364,6 +364,54 @@ function readShareCode() {
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
function sendCard(cardNo) {
|
||||
return new Promise((resolve) => {
|
||||
$.post(taskPostUrl('newyearmoney_sendCard', {"cardNo": cardNo}), async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
data = JSON.parse(data);
|
||||
if (data && data.data['bizCode'] === 0) {
|
||||
receiveCardList.push(data.data.result.token)
|
||||
console.log(`送卡成功`)
|
||||
} else {
|
||||
console.log(`送卡失败,${data.data.bizMsg}`)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function receiveCard(token) {
|
||||
return new Promise((resolve) => {
|
||||
$.post(taskPostUrl('newyearmoney_receiveCard', {"token": token}), async (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
console.log(`${JSON.stringify(err)}`)
|
||||
console.log(`${$.name} API请求失败,请检查网路重试`)
|
||||
} else {
|
||||
data = JSON.parse(data);
|
||||
if (data && data.data['bizCode'] === 0) {
|
||||
console.log(`领卡成功`)
|
||||
} else {
|
||||
console.log(`领卡失败,${data.data.bizMsg}`)
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
//格式化助力码
|
||||
function shareCodesFormat() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user