MCPcopy Create free account
hub / github.com/chavyleung/scripts / sign

Function sign

wanda/wanda.js:44–66  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

42
43
44function sign() {
45 return new Promise((resolve) => {
46 const signVal = getKey()['key'] + '/activityWholeSign/wholeSignUp.apiactivityCode='+$.signCode+'&signDate='+date
47 mx_api['ts'] = getKey()['ts']
48 mx_api['check'] = hex_md5(signVal)
49 const url = {
50 url:'https://activity-api-mx.wandafilm.com/activityWholeSign/wholeSignUp.api',
51 headers:{
52 'MX-API':JSON.stringify(mx_api),
53 },
54 body : 'activityCode='+$.signCode+'&signDate=' + date
55 }
56 $.post(url, (err, resp, data) => {
57 try {
58 $.sign = JSON.parse(data)
59 } catch (e) {
60 $.logErr(e, resp)
61 } finally {
62 resolve()
63 }
64 })
65 })
66}
67
68function signRecord() {
69 return new Promise((resolve) => {

Callers 1

wanda.jsFile · 0.70

Calls 4

getKeyFunction · 0.85
hex_md5Function · 0.85
postMethod · 0.45
logErrMethod · 0.45

Tested by

no test coverage detected