锻造界面数据接口的添加

This commit is contained in:
liuliang 2025-01-08 18:48:43 +08:00
parent 55e8940b48
commit 847f240927
9 changed files with 1419 additions and 214 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 546b367bb046e6344af8f21849c03dca
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load Diff

View File

@ -42,6 +42,7 @@ public class Scene_main_jiekou :MonoBehaviour
withdrawAccountUpdate withdrawAccountUpdate = new withdrawAccountUpdate(); withdrawAccountUpdate withdrawAccountUpdate = new withdrawAccountUpdate();
ForgingConfig forgingConfig = new ForgingConfig(); ForgingConfig forgingConfig = new ForgingConfig();
ForgingSumbit forgingSumbit = new ForgingSumbit(); ForgingSumbit forgingSumbit = new ForgingSumbit();
Forgingdatalist forgingdatalist = new Forgingdatalist();
teamInfo teamInfo = new teamInfo(); teamInfo teamInfo = new teamInfo();
teamFansList teamFansList = new teamFansList(); teamFansList teamFansList = new teamFansList();
modifyTradePassword modifyTradePassword = new modifyTradePassword(); modifyTradePassword modifyTradePassword = new modifyTradePassword();
@ -56,6 +57,8 @@ public class Scene_main_jiekou :MonoBehaviour
Islandownerbidding islandownerbidding=new Islandownerbidding(); Islandownerbidding islandownerbidding=new Islandownerbidding();
petdraw petdraw = new petdraw(); petdraw petdraw = new petdraw();
treeachievement treeachievement = new treeachievement(); treeachievement treeachievement = new treeachievement();
public static Scene_main_jiekou instance; public static Scene_main_jiekou instance;
//public PlayerInfoData infoData; //public PlayerInfoData infoData;
@ -398,4 +401,8 @@ public class Scene_main_jiekou :MonoBehaviour
return await treeachievement.Treeachievement(); return await treeachievement.Treeachievement();
} }
public async Task<ForgingdatalistResponse> ForgingdatalistInfos()
{
return await forgingdatalist.ForgingdatalistInfo();
} }
}

View File

@ -0,0 +1,22 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using TMPro;
public class forgingConnctitem : MonoBehaviour
{
public Image icon;
public TextMeshProUGUI name;
public TextMeshProUGUI RemainingOutput;
public TextMeshProUGUI RemainingTime;
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 747db1ad94268e640b0504b5f02456f7
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -7,9 +7,14 @@ public class scenefroge : MonoBehaviour
public GameObject forgingItem; public GameObject forgingItem;
public GameObject forgingConnctitem;
public Transform CoinConnact;
public Transform GemConnact;
public Transform Connact; public Transform Connact;
public List<GameObject> forginglist =new List<GameObject>(); List<GameObject> forginglist =new List<GameObject>();
private async void OnEnable() private async void OnEnable()
{ {
ForgingResponse forging = await Scene_main_jiekou.instance.ForgingInfos(); ForgingResponse forging = await Scene_main_jiekou.instance.ForgingInfos();
@ -51,6 +56,10 @@ public class scenefroge : MonoBehaviour
obj.GetComponent<FrogeItem>().price_type.sprite = obj.GetComponent<FrogeItem>().gold; obj.GetComponent<FrogeItem>().price_type.sprite = obj.GetComponent<FrogeItem>().gold;
} }
} }
} }
// Update is called once per frame // Update is called once per frame

View File

@ -0,0 +1,49 @@
using Newtonsoft.Json;
using System.Collections;
using System.Collections.Generic;
using System.Threading.Tasks;
using UnityEngine;
public class Forgingdatalist : MonoBehaviour
{
public Dictionary<string, string> CreateHeaders()
{
if (string.IsNullOrEmpty(MyGlobal.global.loginResponse.Data.access_token))
{
Debug.LogWarning("尝试创建请求头时token 未设置。");
return new Dictionary<string, string>();
}
return new Dictionary<string, string>
{
{ "Authorization","Bearer "+MyGlobal.global.loginResponse.Data.access_token },
{ "client-info", "{\"platform\":\"ios\",\"phone_product\":\"apple\",\"phone_model\":\"iPhone_8\",\"system_version\":\"12.0\",\"screen_size\":\"750*1334\",\"device_no\":\"e3e277810fff9d955ebdd7037eff51a8\",\"version\":\"1.0.0\"}" }
};
}
public async Task<ForgingdatalistResponse> ForgingdatalistInfo()
{
string response = await myWeb.SendRequest(myWeb.URL + "/api/forge_maker/data_list", "GET", "{}", CreateHeaders());
Debug.Log("提现记录" + response);
ForgingdatalistResponse Forgingdatalistresponse = JsonConvert.DeserializeObject<ForgingdatalistResponse>(response);
return Forgingdatalistresponse;
}
}
[System.Serializable]
public class ForgingdatalistData
{
public int id;
public int config_id;
public string config_name;
public string config_icon;
public int config_type;
public int surplus_count;
public int surplus_yield;
}
[System.Serializable]
public class ForgingdatalistResponse:myResponse
{
public ForgingdatalistData[] data;
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 8c93f84b7002f0241b5917ec9fe08bd2
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: