From 865ea763c15b2b5dbdc670c205744c07bfb7a5a4 Mon Sep 17 00:00:00 2001 From: makeyangcom Date: Sat, 16 Mar 2024 12:34:38 +0800 Subject: [PATCH] 3.0.0 --- game/scripts/launch/launch.gd | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/game/scripts/launch/launch.gd b/game/scripts/launch/launch.gd index bd38079..a1c675c 100644 --- a/game/scripts/launch/launch.gd +++ b/game/scripts/launch/launch.gd @@ -77,3 +77,14 @@ func _on_register_confirm_button_pressed() -> void: "answer_b": register_answer_b_input.text, } print(post_data) + Request.on_server("/account/register", HTTPClient.METHOD_POST, post_data, func(_result, code, _headers, body): + if code == 200: + var response = JSON.parse_string(body.get_string_from_utf8()) + print("[接口反馈数据]", response) + if response["code"] == 0: + print("接口请求成功") + else: + printerr("接口请求出错") + else: + printerr("接口异常") + )