MCPcopy Create free account
hub / github.com/Semporia/Scripts / smtgDoShopTask

Function smtgDoShopTask

jd_superMarket.js:1086–1110  ·  view source on GitHub ↗
(taskId, itemId)

Source from the content-addressed store, hash-verified

1084}
1085
1086function smtgDoShopTask(taskId, itemId) {
1087 return new Promise((resolve) => {
1088 const body = {
1089 "taskId": taskId,
1090 "channel": "18"
1091 }
1092 if (itemId) {
1093 body.itemId = itemId;
1094 }
1095 $.get(taskUrl('smtg_doShopTask', body), (err, resp, data) => {
1096 try {
1097 if (err) {
1098 console.log('\n东东超市: API查询请求失败 ‼️‼️')
1099 console.log(JSON.stringify(err));
1100 } else {
1101 data = JSON.parse(data);
1102 }
1103 } catch (e) {
1104 $.logErr(e, resp);
1105 } finally {
1106 resolve(data);
1107 }
1108 })
1109 })
1110}
1111
1112function smtgObtainShopTaskPrize(taskId) {
1113 return new Promise((resolve) => {

Callers 1

doDailyTaskFunction · 0.85

Calls 4

taskUrlFunction · 0.70
getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected