forked from Wenmoux/checkbox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathldygo.js
28 lines (28 loc) · 945 Bytes
/
ldygo.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//联动云租车每日签到https://m.ldygo.com/app/extension/phoneVoucher.html?inviteCode=JW0hcdmJ
const axios = require("axios");
function ldygo() {
return new Promise(async (resolve) => {
try {
let url =
"https://m.ldygo.com/los/zuche-intf-union.signIn";
const header = {
headers: {
cookie: config.ldygo.cookie,
},
};
const postdata = {"_channel_id":"09","_client_version_no":"2.11.0","timestamp":Math.round(new Date().getTime()/1000).toString()}
let res = await axios.post(url, postdata,header);
if (res.data.responseCode == "000000") {
data = `签到成功! ☁️ + ${res.data.model.points}`;
} else {
data = res.data.responseMsg;
}
console.log(data);
} catch (err) {
console.log(err);
data="签到接口请求出错"
}
resolve("【联动云租车】:" + data);
});
}
module.exports = ldygo;