MCPcopy Index your code
hub / github.com/Moli-X/Resources / checkin

Function checkin

Script/Hzh.js:87–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85 .finally(() => $.done());
86
87function checkin() {
88 const url = `https://appgw.huazhu.com/game/sign_in?date=${parseInt(Date.now() / 1000)}`;
89 const headers = {
90 Connection: "keep-alive",
91 "Accept-Encoding": "gzip, deflate, br",
92 "Client-Platform": "APP-IOS",
93 Origin: "https://cdn.huazhu.com",
94 "User-Agent": "HUAZHU/ios/iPhone/18.0/9.24.0/RNWEBVIEW",
95 Cookie: $.cookie,
96 Host: "appgw.huazhu.com",
97 Referer: "https://cdn.huazhu.com/",
98 "Accept-Language": "zh-CN,zh-Hans;q=0.9",
99 Accept: "application/json, text/plain, */*",
100 };
101 const myRequest = {
102 url: url,
103 headers: headers
104 };
105 return $.http.get(myRequest).then((response) => {
106 if (response.statusCode == 200) {
107 if (JSON.parse(response.body).message == "fail") {
108 throw new ERR.EventError("服务器返回数据错误,请重新获取Cookie");
109 } else {
110 $.data = JSON.parse(response.body).content;
111 $.log($.data);
112 }
113 } else {
114 $.error(JSON.stringify(response));
115 throw new ERR.ParseError("签到错误,请检查日志,稍后再试");
116 }
117 });
118}
119
120function showmsg() {
121 if ($.data.signResult == true) {

Callers 1

Hzh.jsFile · 0.85

Calls 6

nowMethod · 0.45
getMethod · 0.45
parseMethod · 0.45
logMethod · 0.45
errorMethod · 0.45
stringifyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…