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

Function getShareCode

activity/jd_nh.js:95–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

93}
94
95function getShareCode() {
96 return new Promise(resolve => {
97 $.get({url:'https://gitee.com/shylocks/updateTeam/raw/main/jd_nh.json',headers:{
98 'user-agent': 'JD4iPhone/167490 (iPhone; iOS 14.2; Scale/3.00)'
99 }},(err,resp,data)=>{
100 try {
101 if (err) {
102 console.log(`${err}`)
103 console.log(`${$.name} API请求失败,请检查网路重试`)
104 } else {
105 if (safeGet(data)) {
106 data = JSON.parse(data);
107 shareUuid = data['shareUuid']
108 }
109 }
110 } catch (e) {
111 $.logErr(e, resp)
112 } finally {
113 resolve(data);
114 }
115 })
116 })
117}
118function getIsvToken() {
119 let config = {
120 url: 'https://api.m.jd.com/client.action?functionId=genToken',

Callers 1

jdNhFunction · 0.70

Calls 4

safeGetFunction · 0.70
getMethod · 0.45
logMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected