Created
December 11, 2018 06:29
-
-
Save zhuping/cc26ed7b60f8978b700a1d10b54335dc to your computer and use it in GitHub Desktop.
万科 积分商城签到
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const axios = require('axios'); | |
const Base64 = require('js-base64').Base64; | |
const md5 = require('js-md5'); | |
const name = Base64.encode('Your Account'); | |
const password = Base64.encode('Your Password'); | |
const URL = 'https://union.vanke.com/api/Member/Login'; | |
let timeStamp = (+new Date).toString(), | |
nonce = 1e4 * Math.random(), | |
clientOSType = 'ios', | |
appId = 1003, | |
appsecret = 'f150f9552b924a6c8d9cf01421784bc8'; | |
let sign = "timestamp:" + timeStamp + "|nonce:" + nonce + "|appSecret:" + appsecret + "|clientOSType:" + clientOSType; | |
sign = md5(sign) | |
axios.post(URL, { | |
body: { | |
AccountName: name, | |
LoginType: 1, | |
Password: password | |
}, | |
header: { | |
accessToken: '', | |
clientOSType: 'wechat', | |
refreshToken: '', | |
sign, | |
version: '1.0' | |
} | |
}).then(resp => { | |
console.log('resp', resp.data); | |
}).catch(error => { | |
console.log('error', error); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment