This commit is contained in:
shurongsen 2024-11-03 19:07:13 +08:00
parent 0059644b31
commit 441ff1d21d
4 changed files with 6 additions and 49 deletions

View File

@ -35,46 +35,11 @@ public class Get_a_voucher : mount
Debug.Log("用户所有代金卷" + daijinjuanponse);
AllVocherItemRes itemList = JsonUtility.FromJson<AllVocherItemRes>(daijinjuanponse);
Debug.Log(itemList.List.Length);
//for (int i = 0; i < itemList.List.Length; i++)
//{
// switch (itemList.List[i].Num)
// {
// case 1:
// Floorint[0] += 1;
// break;
// case 2:
// Floorint[1] += 1;
// break;
// case 3:
// Floorint[2] += 1;
// break;
// case 4:
// Floorint[3] += 1;
// break;
// case 5:
// Floorint[4] += 1;
// break;
// }
//}
//foreach (var k in Floorint)
//{
// Debug.Log("各个楼层的代金卷"+k);
//}
Debug.Log(itemList.List.Length);
}
public void ReturnFloor(int num) //判断楼层是否有代金卷
{
if (Floorint[num - 1] != 0)
{
}
}
// Update is called once per frame

View File

@ -67,7 +67,7 @@ public class Logo_in : mount
login.Phone = boxTypes[0].content;
//register.Code = boxTypes[0].content;
string jsonString = JsonUtility.ToJson(login);
string response = await web.SendRequest("http://47.109.133.52/Player/Register", "POST", jsonString);
string response = await web.SendRequest(web.URL+"/Player/Register", "POST", jsonString);
Debug.Log(response);
}
else if (type == 1)//怬
@ -77,13 +77,10 @@ public class Logo_in : mount
Debug.Log(boxTypes[0].content);
//register.Code = boxTypes[0].content;
string jsonString = JsonUtility.ToJson(login);
string response = await web.SendRequest("http://47.109.133.52/Player/Login", "POST", jsonString);
string response = await web.SendRequest(web.URL+"/Player/Login", "POST", jsonString);
Debug.Log(response);
string daijinjuanponse = await web.SendRequest(web.URL + "/Voucher/GetList", "POST");
Debug.Log("用户所有代金卷" + daijinjuanponse);
Rootobject root = JsonUtility.FromJson<Rootobject>(response);

View File

@ -32,12 +32,7 @@ public class jinsha : mount
}
public int type = 0;
public async void loding()
{
}
public async void Start()
{

View File

@ -144,7 +144,7 @@ public class room : mount
newMiner.transform.SetParent(startPos);
newMiner.transform.position = startPos.position;
Buy_succefful = false;
}
@ -250,7 +250,7 @@ public class room : mount
Mining_Wizard_ID data = JsonUtility.FromJson<Mining_Wizard_ID>(response);
Use use = new Use();
use.Id = data.Ids[0];
if (data.Ids[0] != null)
if (use.Id != null)
{
Buy_succefful = true;
}