优化,兑换奖品不校验ck是否过期

This commit is contained in:
lxk0301
2021-03-17 16:44:24 +08:00
parent f4051d7e02
commit 197272e053
2 changed files with 112 additions and 92 deletions

View File

@@ -54,7 +54,7 @@ const JD_API_HOST = 'https://car-member.jd.com/api/';
cookie = cookiesArr[i];
$.UserName = decodeURIComponent(cookie.match(/pt_pin=(.+?);/) && cookie.match(/pt_pin=(.+?);/)[1])
$.index = i + 1;
console.log(`京东账号${$.index} ${$.UserName}`)
console.log(`*********京东账号${$.index} ${$.UserName}*********`)
$.isLogin = true;
$.nickName = '';
message = '';
@@ -85,11 +85,12 @@ function exchange() {
$.post(taskUrl('v1/user/exchange/bean'), (err, resp, data) => {
try {
if (err) {
data = JSON.parse(resp.body)
console.log(`${JSON.stringify(err)}`)
console.log(`${$.name} user/exchange/bean API请求失败请检查网路重试\n`)
} else {
if (safeGet(data)) {
data = JSON.parse(data);
console.log(`兑换结果:${JSON.stringify(data)}`)
console.log(`兑换结果:${JSON.stringify(data)}\n`)
}
}
} catch (e) {