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

Function getPin

jd_pk.js:609–644  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

607}
608
609function getPin() {
610 return new Promise((resolve) => {
611 let options = {
612 "url": "https://jdjoy.jd.com/saas/framework/encrypt/pin?appId=dafbe42d5bff9d82298e5230eb8c3f79",
613 "headers": {
614 "Host": "jdjoy.jd.com",
615 "Origin": "https://prodev.m.jd.com",
616 "Cookie": cookie,
617 "Connection": "keep-alive",
618 "Accept": "application/json, text/plain, */*",
619 "User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.2.2;14.2;%E4%BA%AC%E4%B8%9C/9.2.2 CFNetwork/1206 Darwin/20.1.0"),
620 "Accept-Language": "zh-cn",
621 "Referer": "https://prodev.m.jd.com/mall/active/4HTqMAvser7ctEBEdhK4yA7fXpPi/index.html?babelChannel=ttt9&tttparams=AeOIMwdeyJnTG5nIjoiMTE3LjAyOTE1NyIsImdMYXQiOiIyNS4wOTUyMDcifQ7%3D%3D&lng=00.000000&lat=00.000000&sid=&un_area="
622 }
623 }
624
625 $.post(options, (err, resp, res) => {
626 try {
627 console.log(res);
628 if (res) {
629 let data = JSON.parse(res);
630 if (data) {
631 // $.pin = data.data;
632 $.pin = data.data.lkEPin;
633 $.lkToken = data.data.lkToken;
634 }
635
636 }
637 } catch (e) {
638 console.log(e);
639 } finally {
640 resolve(res);
641 }
642 })
643 });
644}
645function jdShareBattleLaunch(a) {
646 return new Promise((resolve) => {
647 //lkEPin=${$.pin}&lkToken=${$.lkToken}&sign=${sign}&t=${timestamp}

Callers 1

mainFunction · 0.85

Calls 4

isNodeMethod · 0.45
getdataMethod · 0.45
postMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected