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

Function adlog

jd_wxFans.js:241–269  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

239}
240
241function adlog() {
242 let config = taskPostUrl("/common/accessLogWithAD", `venderId=${$.shopid}&code=69&pin=${encodeURIComponent($.pin)}&activityId=90121061401&pageUrl=https://lzkjdz-isv.isvjcloud.com/wxFansInterActionActivity/activity/590580?activityId=aae88e19901340a28b604f5cf5b61dd6&shareuserid4minipg=jd_4806fb66e0f3e&shopid=undefined&subType=app&adSource=`)
243 // console.log(config)
244 return new Promise(resolve => {
245 $.post(config, async (err, resp, data) => {
246 try {
247 if (err) {
248 console.log(`${JSON.stringify(err)}`)
249 console.log(`${$.name} API请求失败,请检查网路重试`)
250 } else {
251 // data = JSON.parse(data);
252 if ($.isNode())
253 for (let ck of resp['headers']['set-cookie']) {
254 cookie = `${cookie}; ${ck.split(";")[0]};`
255 }
256 else {
257 for (let ck of resp['headers']['Set-Cookie'].split(',')) {
258 cookie = `${cookie}; ${ck.split(";")[0]};`
259 }
260 }
261 }
262 } catch (e) {
263 $.logErr(e, resp)
264 } finally {
265 resolve(data);
266 }
267 })
268 })
269}
270
271
272

Callers 1

jd_wxFans.jsFile · 0.70

Calls 5

taskPostUrlFunction · 0.70
postMethod · 0.45
logMethod · 0.45
isNodeMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected