Skip to content

Commit 9d94c09

Browse files
authored
Merge pull request #297 from fanhengkui/main
调整README.md文档、庙友之家调整请求
2 parents df09f7f + 419c15b commit 9d94c09

2 files changed

Lines changed: 76 additions & 6 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@
5858
需要配置 `wx_server_url` / `wx_auth` 获取微信小程序 `code`。首次使用一般需要先在对应微信小程序内完成注册、授权或绑定手机号。
5959

6060
<!-- WXAPP_TABLE_START -->
61+
| 脚本名称 | 最后一次更新时间 | 当前状态 |
62+
| :--- | :----: | :----: |
6163
| 杰士邦会员中心 | 2026-07-14 09:32:52 | ✅ |
6264
| 雀巢会员俱乐部 | 2026-07-14 09:32:52 | ✅ |
6365
| 好人家签到 | 2026-07-14 09:32:52 | ✅ |

‎wxapp/miaoyouHome.js‎

Lines changed: 74 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,83 @@ class UserInfo {
2222
//定义在这里的headers会被get请求删掉content-type 而不会重置
2323
}
2424
async main() {
25+
26+
await this.manageList()
27+
await this.querySceneGameInstance()
2528
await this.task();
2629
await this.userInfo()
2730
}
31+
32+
33+
async manageList() {
34+
try {
35+
let options = {
36+
fn: "首页",
37+
method: "post",
38+
url: `https://www.popcentury.cn/scrm-rz-minip-tzlm/minipPointsController/showIconManageList`,
39+
headers: {
40+
"Connection": "keep-alive",
41+
//"Content-Length": "2",
42+
"Accept": "application/json, text/plain, */*",
43+
"X-Requested-With": "XMLHttpRequest",
44+
"User-Agent": "Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/111.0.5563.116 Mobile Safari/537.36 XWEB/1110017 MMWEBSDK/20231002 MMWEBID/2585 MicroMessenger/8.0.43.2480(0x28002B51) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64",
45+
"Content-Type": "application/json;charset=UTF-8",
46+
"Origin": "http://www.jumpingcarp.cn",
47+
"Referer": "https://servicewechat.com/wx10b22bd20e2bccca/11/page-frame.html",
48+
"Accept-Encoding": "gzip, deflate",
49+
"Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
50+
//"Cookie": "JSESSIONID=" + this.ck
51+
},
52+
body: JSON.stringify({})
53+
}
54+
let { body: result } = await $.httpRequest(options);
55+
//console.log(options);
56+
//console.log(result);
57+
for (let item of result.data.iconList) {
58+
if (item.iconName.match(/签到/)) {
59+
this.sceneGameInstanceCode = item.actionUrl.split("?")[1]
60+
break
61+
}
62+
}
63+
} catch (e) {
64+
console.log(e);
65+
}
66+
}
67+
async querySceneGameInstance() {
68+
try {
69+
let options = {
70+
fn: "签到信息",
71+
method: "post",
72+
url: `https://www.popcentury.cn/scrm-rz-minip-tzlm/minipPointsController/querySceneGameInstance`,
73+
headers: {
74+
"Connection": "keep-alive",
75+
//"Content-Length": "2",
76+
"Accept": "application/json, text/plain, */*",
77+
"X-Requested-With": "XMLHttpRequest",
78+
"User-Agent": "Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/111.0.5563.116 Mobile Safari/537.36 XWEB/1110017 MMWEBSDK/20231002 MMWEBID/2585 MicroMessenger/8.0.43.2480(0x28002B51) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64",
79+
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
80+
"Origin": "http://www.jumpingcarp.cn",
81+
"Referer": "https://servicewechat.com/wx10b22bd20e2bccca/11/page-frame.html",
82+
"Accept-Encoding": "gzip, deflate",
83+
"Accept-Language": "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7",
84+
"Cookie": "JSESSIONID=" + this.ck
85+
},
86+
body: `${this.sceneGameInstanceCode}`
87+
}
88+
let { body: result } = await $.httpRequest(options);
89+
//console.log(options);
90+
//console.log(result);
91+
92+
} catch (e) {
93+
console.log(e);
94+
}
95+
}
2896
async task() {
2997
try {
3098
let options = {
3199
fn: "签到",
32100
method: "post",
33-
url: `http://www.jumpingcarp.cn/scrm-rz-wechat-tzlm/lotteryController/extractMemberAwards`,
101+
url: `https://www.popcentury.cn/scrm-rz-minip-tzlm/minipPointsController/extractInstanceMemberAwards?${this.sceneGameInstanceCode}`,
34102
headers: {
35103
"Connection": "keep-alive",
36104
//"Content-Length": "2",
@@ -49,7 +117,7 @@ class UserInfo {
49117
let { body: result } = await $.httpRequest(options);
50118
//console.log(options);
51119
console.log(result);
52-
120+
53121
} catch (e) {
54122
console.log(e);
55123
}
@@ -59,7 +127,7 @@ class UserInfo {
59127
let options = {
60128
fn: "我的积分",
61129
method: "post",
62-
url: `http://www.jumpingcarp.cn/scrm-rz-wechat-tzlm/memberController/showMemberInfo`,
130+
url: `https://www.popcentury.cn/scrm-rz-minip-tzlm/memberController/showMemberInfo.do`,
63131
headers: {
64132
"Connection": "keep-alive",
65133
//"Content-Length": "2",
@@ -78,12 +146,12 @@ class UserInfo {
78146
let { body: result } = await $.httpRequest(options);
79147
//console.log(options);
80148
//console.log(result);
81-
if(result.code == 200){
149+
if (result.code == 200) {
82150
$.log(`当前积分[${result.data.pointsBalance}]`)
83-
}else {
151+
} else {
84152
console.log(result);
85153
}
86-
154+
87155
} catch (e) {
88156
console.log(e);
89157
}

0 commit comments

Comments
 (0)