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

Method get_integral

daily/erke.py:76–106  ·  view source on GitHub ↗

查询积分明细

(self)

Source from the content-addressed store, hash-verified

74 }
75
76 def get_integral(self):
77 """查询积分明细"""
78 sign_data = calculate_sign(self.appid, self.member_id)
79 data = {
80 'currentPage': 1,
81 'pageSize': 20,
82 'memberId': self.member_id,
83 'cliqueId': '-1',
84 'enterpriseId': self.enterprise_id,
85 'unionid': self.unionid,
86 'openid': self.openid,
87 'wxOpenid': self.wx_openid,
88 'random': sign_data['random'],
89 'appid': self.appid,
90 'transId': sign_data['transId'],
91 'sign': sign_data['sign'],
92 'timestamp': sign_data['timestamp'],
93 'gicWxaVersion': '3.9.56'
94 }
95
96 try:
97 res = requests.post(f"{self.base_url}/integral_record.json",
98 headers=self.get_headers(self.enterprise_id),
99 data=data, timeout=10).json()
100 response_obj = res.get('response', {})
101 accumulate = response_obj.get('accumulatPoints', 0)
102 logger.info(f"[{self.account_name}] 当前累计积分: {accumulate}")
103 return accumulate
104 except Exception as e:
105 logger.error(f"[{self.account_name}] 积分查询异常: {e}")
106 return "未知"
107
108 def sign_in(self):
109 """执行签到"""

Callers 1

mainFunction · 0.95

Calls 6

get_headersMethod · 0.95
calculate_signFunction · 0.85
postMethod · 0.45
getMethod · 0.45
infoMethod · 0.45
errorMethod · 0.45

Tested by

no test coverage detected