MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / query

Method query

wxapp/tclx_lc.js:117–137  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

115 }
116
117 async query() {
118 const member = await request({
119 method: "GET",
120 url: "https://wx.17u.cn/wechatmypubapi/myInfo/memberInfo",
121 headers: this.headers(),
122 });
123 const mileage = await request({
124 method: "POST",
125 url: "https://tcmobileapi.17usoft.com/mallgatewayapi/userApi/mileages/remain",
126 headers: this.headers({
127 "content-type": "application/json",
128 "TC-MALL-DEPT-CODE": "iH3PGf9ZucSMMEYi4keylA==",
129 "TC-MALL-CLIENT": "API_CLIENT",
130 "TC-MALL-OS-TYPE": "Android",
131 }),
132 data: { osType: 2 },
133 });
134 const remain = mileage.data?.data?.remainBalance ?? mileage.data?.data?.balance ?? mileage.data?.remainBalance;
135 const content = member.data?.content || member.data?.data?.content || {};
136 return `会员=${short(content.memberBanner || content.memberRights || content, 100)} 里程=${remain ?? short(mileage.data, 100)}`;
137 }
138
139 async sign() {
140 const days = getFiveDays();

Callers 1

runAccountFunction · 0.95

Calls 3

headersMethod · 0.95
requestFunction · 0.70
shortFunction · 0.70

Tested by

no test coverage detected