增加随机互助
This commit is contained in:
10
jd_city.js
10
jd_city.js
@@ -240,7 +240,7 @@ function city_lotteryAward() {
|
|||||||
function readShareCode() {
|
function readShareCode() {
|
||||||
console.log(`开始`)
|
console.log(`开始`)
|
||||||
return new Promise(async resolve => {
|
return new Promise(async resolve => {
|
||||||
$.get({url: `http://jd.turinglabs.net/api/v2/jd/city/read/10/`, 'timeout': 10000}, (err, resp, data) => {
|
$.get({url: `http://share.turinglabs.net/api/v3/city/query/10/`, 'timeout': 10000}, (err, resp, data) => {
|
||||||
try {
|
try {
|
||||||
if (err) {
|
if (err) {
|
||||||
console.log(`${JSON.stringify(err)}`)
|
console.log(`${JSON.stringify(err)}`)
|
||||||
@@ -272,10 +272,10 @@ function shareCodesFormat() {
|
|||||||
const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1);
|
const tempIndex = $.index > inviteCodes.length ? (inviteCodes.length - 1) : ($.index - 1);
|
||||||
$.newShareCodes = inviteCodes[tempIndex].split('@');
|
$.newShareCodes = inviteCodes[tempIndex].split('@');
|
||||||
}
|
}
|
||||||
// const readShareCodeRes = await readShareCode();
|
const readShareCodeRes = await readShareCode();
|
||||||
// if (readShareCodeRes && readShareCodeRes.code === 200) {
|
if (readShareCodeRes && readShareCodeRes.code === 200) {
|
||||||
// $.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])];
|
$.newShareCodes = [...new Set([...$.newShareCodes, ...(readShareCodeRes.data || [])])];
|
||||||
// }
|
}
|
||||||
console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`)
|
console.log(`第${$.index}个京东账号将要助力的好友${JSON.stringify($.newShareCodes)}`)
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user