Skip to content

Commit c5621ea

Browse files
committed
更新[京东618]: 修复由于获取Cookie错误时, 报33行错误问题
1 parent ebfdcbe commit c5621ea

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

‎jd/jd.618.js‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function getData() {
3030
$.log(` 等级 = ${_info?.raiseInfo?.scoreLevel}`)
3131
$.log(` 分数 = ${_info?.raiseInfo?.totalScore} => ${_info?.raiseInfo?.nextLevelScore}`, '')
3232
} catch (e) {
33-
$.log(`❗️ ${$.name}, 获取密钥!`, ` error = ${e}`, `response = ${JSON.parse(response)}`, `data = ${data}`, '')
33+
$.log(`❗️ ${$.name}, 获取密钥!`, ` error = ${error || e}`, `response = ${JSON.stringify(response)}`, `data = ${data}`, '')
3434
} finally {
3535
resove()
3636
}
@@ -67,7 +67,7 @@ function getActs() {
6767
if (!$.acts) throw new Error('获取活动失败!')
6868
$.log(` 活动数量 = ${$.acts.length}`, '')
6969
} catch (e) {
70-
$.log(`❗️ ${$.name}, 获取活动!`, ` error = ${e}`, `response = ${JSON.parse(response)}`, `data = ${data}`, '')
70+
$.log(`❗️ ${$.name}, 获取活动!`, ` error = ${error || e}`, `response = ${JSON.stringify(response)}`, `data = ${data}`, '')
7171
} finally {
7272
resove()
7373
}
@@ -154,7 +154,7 @@ function getProdAct(act) {
154154
act.subacts.push(_subact)
155155
})
156156
} catch (e) {
157-
$.log(`❗️ ${$.name}, 执行商品类活动!`, ` error = ${error || e}`, `response = ${JSON.parse(response)}`, `data = ${data}`, '')
157+
$.log(`❗️ ${$.name}, 执行商品类活动!`, ` error = ${error || e}`, `response = ${JSON.stringify(response)}`, `data = ${data}`, '')
158158
} finally {
159159
resove()
160160
}
@@ -195,6 +195,8 @@ function taskurl(fid, body = '{}') {
195195
const url = { url: `https://api.m.jd.com/client.action` }
196196
url.headers = JSON.parse($.VAL_headers)
197197
url.body = `functionId=${fid}&body=${body}&client=wh5&clientVersion=1.0.0`
198+
$.log(`❕ ${$.name}, url: ${url.url}, body: ${url.body}`)
199+
$.log(`❕ ${$.name}, ckurl: ${$.VAL_url}, ckbody: ${$.VAL_body}`)
198200
return url
199201
}
200202

0 commit comments

Comments
 (0)