This commit is contained in:
2026-04-23 17:24:31 +08:00
parent c5d933dcad
commit cdcfa7eee9
10 changed files with 179 additions and 220 deletions
+3 -3
View File
@@ -183,7 +183,7 @@ namespace Assets.MyGame.Scripts.Net
{
var json = req.downloadHandler.text;
var res = JsonConvert.DeserializeObject<APIResponse<T>>(json);
Debug.Log("url----" + url+"--"+ "Json-"+json+"res--"+JsonConvert.SerializeObject(res));
// 自动保存 token
if (typeof(T) == typeof(UserToken))
{
@@ -192,7 +192,6 @@ namespace Assets.MyGame.Scripts.Net
Debug.Log("微信登录成功 Token" + token);
}
Log(json + "\n------Get");
if (res.code == 0)
{
action?.Invoke(res.data);
@@ -237,7 +236,8 @@ namespace Assets.MyGame.Scripts.Net
{
var json = req.downloadHandler.text;
var res = JsonConvert.DeserializeObject<APIResponse<T>>(json);
Log(json + "\n------Post");
Debug.Log("url----" + url + "--" + "Json-" + json + "res--" + JsonConvert.SerializeObject(res));
if (res.code == 0)
{
action?.Invoke(res.data);