锻造界面数据接口的添加
This commit is contained in:
parent
55e8940b48
commit
847f240927
1089
meng_yao/Assets/Prefabs/ui/forgingConnctitem.prefab
Normal file
1089
meng_yao/Assets/Prefabs/ui/forgingConnctitem.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
meng_yao/Assets/Prefabs/ui/forgingConnctitem.prefab.meta
Normal file
7
meng_yao/Assets/Prefabs/ui/forgingConnctitem.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 546b367bb046e6344af8f21849c03dca
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
File diff suppressed because it is too large
Load Diff
@ -42,6 +42,7 @@ public class Scene_main_jiekou :MonoBehaviour
|
||||
withdrawAccountUpdate withdrawAccountUpdate = new withdrawAccountUpdate();
|
||||
ForgingConfig forgingConfig = new ForgingConfig();
|
||||
ForgingSumbit forgingSumbit = new ForgingSumbit();
|
||||
Forgingdatalist forgingdatalist = new Forgingdatalist();
|
||||
teamInfo teamInfo = new teamInfo();
|
||||
teamFansList teamFansList = new teamFansList();
|
||||
modifyTradePassword modifyTradePassword = new modifyTradePassword();
|
||||
@ -56,6 +57,8 @@ public class Scene_main_jiekou :MonoBehaviour
|
||||
Islandownerbidding islandownerbidding=new Islandownerbidding();
|
||||
petdraw petdraw = new petdraw();
|
||||
treeachievement treeachievement = new treeachievement();
|
||||
|
||||
|
||||
public static Scene_main_jiekou instance;
|
||||
|
||||
//public PlayerInfoData infoData;
|
||||
@ -398,4 +401,8 @@ public class Scene_main_jiekou :MonoBehaviour
|
||||
return await treeachievement.Treeachievement();
|
||||
}
|
||||
|
||||
public async Task<ForgingdatalistResponse> ForgingdatalistInfos()
|
||||
{
|
||||
return await forgingdatalist.ForgingdatalistInfo();
|
||||
}
|
||||
}
|
||||
|
22
meng_yao/Assets/script/scene_Main/ui/forgingConnctitem.cs
Normal file
22
meng_yao/Assets/script/scene_Main/ui/forgingConnctitem.cs
Normal 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()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 747db1ad94268e640b0504b5f02456f7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -7,9 +7,14 @@ public class scenefroge : MonoBehaviour
|
||||
|
||||
|
||||
public GameObject forgingItem;
|
||||
public GameObject forgingConnctitem;
|
||||
|
||||
public Transform CoinConnact;
|
||||
public Transform GemConnact;
|
||||
|
||||
public Transform Connact;
|
||||
|
||||
public List<GameObject> forginglist =new List<GameObject>();
|
||||
List<GameObject> forginglist =new List<GameObject>();
|
||||
private async void OnEnable()
|
||||
{
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
// Update is called once per frame
|
||||
|
@ -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;
|
||||
}
|
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8c93f84b7002f0241b5917ec9fe08bd2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user