diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..0ce7a27 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,20 @@ +{ + "MicroPython.executeButton": [ + { + "text": "▶", + "tooltip": "运行", + "alignment": "left", + "command": "extension.executeFile", + "priority": 3.5 + } + ], + "MicroPython.syncButton": [ + { + "text": "$(sync)", + "tooltip": "同步", + "alignment": "left", + "command": "extension.execute", + "priority": 4 + } + ] +} \ No newline at end of file diff --git a/app.py b/app.py index e3b51c1..b55cbd0 100644 --- a/app.py +++ b/app.py @@ -21,7 +21,7 @@ def send_custom_json(ida): "nonce": nonce }, "params": { - "token": "At_0000hz7d3dcf1dbd884b4ba94a26c621", + "token": "At_0000hz6cc6b1e0444c4b848d5ad85927", "deviceId": "9F01FD3PAZ9B6B4", "channelId": "0", "operation": ida, @@ -32,16 +32,12 @@ def send_custom_json(ida): target_url = 'https://openapi.lechange.cn:443/openapi/controlMovePTZ' headers = {'Content-Type': 'application/json'} try: - # ԶJSONתΪַ json_payload = json.dumps(custom_json) - # POSTⲿAPI response = requests.post(target_url, data=json_payload, headers=headers) - # Ƿɹ if response.status_code == 200: print('Request sent successfully') - # ĿAPIӦͻ return jsonify(response.json()) else: print(f'Failed to send request, status code: {response.status_code}')