fix云函数无法使用的问题
fix云函数无法使用的问题
This commit is contained in:
@@ -68,7 +68,7 @@ const JD_API_HOST = 'https://api.m.jd.com/api';
|
|||||||
}
|
}
|
||||||
await getRedRain();
|
await getRedRain();
|
||||||
if(!$.activityId) return
|
if(!$.activityId) return
|
||||||
let nowTs = new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000
|
let nowTs = new Date().getTime()
|
||||||
if (!($.st <= nowTs && nowTs < $.ed)) {
|
if (!($.st <= nowTs && nowTs < $.ed)) {
|
||||||
console.log(`不在红包雨时间之内`)
|
console.log(`不在红包雨时间之内`)
|
||||||
return
|
return
|
||||||
@@ -178,7 +178,7 @@ function receiveRedRain() {
|
|||||||
|
|
||||||
function taskUrl(function_id, body = {}) {
|
function taskUrl(function_id, body = {}) {
|
||||||
return {
|
return {
|
||||||
url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&_=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`,
|
url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&client=wh5&clientVersion=1.0.0&_=${new Date().getTime()}`,
|
||||||
headers: {
|
headers: {
|
||||||
"Accept": "*/*",
|
"Accept": "*/*",
|
||||||
"Accept-Encoding": "gzip, deflate, br",
|
"Accept-Encoding": "gzip, deflate, br",
|
||||||
|
Reference in New Issue
Block a user