fix jd_joy_run.js
This commit is contained in:
@@ -66,7 +66,8 @@
|
||||
**脚本兼容: [QuantumultX](https://apps.apple.com/us/app/quantumult-x/id1443988620), [Surge](https://apps.apple.com/us/app/surge-4/id1442620678), [Loon](https://apps.apple.com/us/app/loon/id1373567447), 小火箭, JSBox, Node.js**
|
||||
|
||||
**TODO**
|
||||
- [ ] 所有活动互助码在一个脚本打印
|
||||
- [x] 所有活动互助码在一个脚本打印
|
||||
- [ ] 京喜工厂添加预测N天后可兑换功能
|
||||
|
||||
## 邀请码互助
|
||||
- [邀请码互助入口](https://github.com/lxk0301/jd_scripts/discussions)
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
宠汪汪邀请助力与赛跑助力脚本,感谢github@Zero-S1提供帮助
|
||||
更新时间:2020-12-16(宠汪汪助力更新Token的配置正则表达式已改)
|
||||
更新时间:2021-1-6(宠汪汪助力更新Token的配置正则表达式已改)
|
||||
|
||||
token时效很短,几个小时就失效了,闲麻烦的放弃就行
|
||||
每天拿到token后,可一次性运行完毕即可。
|
||||
@@ -245,6 +245,7 @@ async function invite(invite_pins) {
|
||||
for (let item of invite_pins.map(item => item.trim())) {
|
||||
console.log(`\n账号${$.index} [${UserName}] 开始给好友 [${item}] 进行邀请助力`)
|
||||
const data = await enterRoom(item);
|
||||
if (data) {
|
||||
if (!data.success && data.errorCode === 'B0001') {
|
||||
console.log('京东Cookie失效');
|
||||
$.msg($.name, `【提示】京东cookie已失效`, `京东账号${$.index} ${UserName}\n请重新登录获取\nhttps://bean.m.jd.com/`, {"open-url": "https://bean.m.jd.com/"});
|
||||
@@ -278,6 +279,7 @@ async function invite(invite_pins) {
|
||||
$.jdLogin = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// if ($.inviteReward > 0) {
|
||||
// $.msg($.name, ``, `账号${$.index} [${UserName}]\n给${$.inviteReward/5}人邀请助力成功\n获得${$.inviteReward}积分`)
|
||||
// }
|
||||
@@ -293,8 +295,8 @@ function enterRoom(invitePin) {
|
||||
$.get(options, (err, resp, data) => {
|
||||
try {
|
||||
if (err) {
|
||||
$.log('API请求失败')
|
||||
$.logErr(JSON.stringify(err));
|
||||
$.log(`${$.name} API请求失败`)
|
||||
$.log(JSON.stringify(err))
|
||||
} else {
|
||||
data = JSON.parse(data);
|
||||
// console.log('进入房间', data)
|
||||
|
Reference in New Issue
Block a user