MCPcopy Index your code
hub / github.com/NobyDa/Script / notifyTask

Function notifyTask

iQIYI-DailyBonus/iQIYI.js:317–332  ·  view source on GitHub ↗
(task)

Source from the content-addressed store, hash-verified

315}
316
317function notifyTask(task) {
318 return new Promise(resolve => {
319 $nobyda.get('https://tc.vip.iqiyi.com/taskCenter/task/notify?taskCode=' + task.taskCode + '&lang=zh_CN&platform=0000000000000000&P00001=' + P00001, function (error, response, data) {
320 let notifyTaskMsg, Details = LogDetails ? `msg:\n${data || error}` : '';
321 try {
322 if (error) throw new Error(`请求失败`);
323 const obj = JSON.parse(data);
324 notifyTaskMsg = obj.code || '失败';
325 } catch (e) {
326 notifyTaskMsg = e.message || e;
327 }
328 console.log(`爱奇艺-开始任务: ${task.name} => ${notifyTaskMsg} ${Details}`)
329 resolve()
330 })
331 })
332}
333
334function getTaskRewards(task) {
335 return new Promise(resolve => {

Callers 1

iQIYI.jsFile · 0.85

Calls 2

getMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected