This commit is contained in:
hackrobot
2024-04-10 19:09:49 +08:00
parent d0cb2a247a
commit b7109dc322
2 changed files with 18 additions and 0 deletions

Binary file not shown.

18
main.py
View File

@@ -86,6 +86,24 @@ async def payh5(item: dict):
# 返回结果中包含`jsapi`字段该字段的值即是前端发起时所需的6个支付参数
headers = {"content-type": "application/x-www-form-urlencoded"}
response = requests.post(request_url, data=order, headers=headers)
if response:
print(response.json())
return response.json()
@app.post("/joinwechat")
async def joinwechat(item: dict):
print('item')
data = {
"wxid": None,
}
data["wxid"] =item['wxid']
request_url = "https://kunpeng.hackrobot.cn/joingroup"
# 返回结果中包含`jsapi`字段该字段的值即是前端发起时所需的6个支付参数
headers = {"content-type": "application/x-www-form-urlencoded"}
response = requests.post(request_url, data=data, headers=headers)
if response:
print(response.json())
return response.json()