diff --git a/__pycache__/main.cpython-310.pyc b/__pycache__/main.cpython-310.pyc index 3dcb870..7e49192 100644 Binary files a/__pycache__/main.cpython-310.pyc and b/__pycache__/main.cpython-310.pyc differ diff --git a/main.py b/main.py index 4f6b435..c941432 100644 --- a/main.py +++ b/main.py @@ -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() \ No newline at end of file