转增接口所有接口完成接入
This commit is contained in:
parent
63dde9174f
commit
4a222051a8
1561
meng_yao/Assets/Resources/Prefabs/GiveawayNumberPanel.prefab
Normal file
1561
meng_yao/Assets/Resources/Prefabs/GiveawayNumberPanel.prefab
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: d180986aa70c1c1439d24ec6aa141683
|
||||||
|
PrefabImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -97,6 +97,7 @@ MonoBehaviour:
|
|||||||
username: {fileID: 3835179725328637314}
|
username: {fileID: 3835179725328637314}
|
||||||
userid: {fileID: 3835179723944946966}
|
userid: {fileID: 3835179723944946966}
|
||||||
GiveBtn: {fileID: 3835179723751752291}
|
GiveBtn: {fileID: 3835179723751752291}
|
||||||
|
GiveawayNumber: {fileID: 8191181331549273727, guid: d180986aa70c1c1439d24ec6aa141683, type: 3}
|
||||||
uid:
|
uid:
|
||||||
--- !u!1 &3835179723641606691
|
--- !u!1 &3835179723641606691
|
||||||
GameObject:
|
GameObject:
|
||||||
|
48
meng_yao/Assets/script/scene_Main/ui/GiveawayNumberPanel.cs
Normal file
48
meng_yao/Assets/script/scene_Main/ui/GiveawayNumberPanel.cs
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
using System.Collections;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using UnityEngine;
|
||||||
|
using UnityEngine.UI;
|
||||||
|
|
||||||
|
public class GiveawayNumberPanel : MonoBehaviour
|
||||||
|
{
|
||||||
|
|
||||||
|
public InputField GiftQuantity;
|
||||||
|
public InputField TransferPassword;
|
||||||
|
[HideInInspector]
|
||||||
|
public string uid;
|
||||||
|
public Button CloseBtn;
|
||||||
|
public Button CancelBtn;
|
||||||
|
public Button SureBtn;
|
||||||
|
|
||||||
|
void Start()
|
||||||
|
{
|
||||||
|
CloseBtn.onClick.AddListener(CloseClick);
|
||||||
|
CancelBtn.onClick.AddListener(CloseClick);
|
||||||
|
SureBtn.onClick.AddListener(SureClick);
|
||||||
|
}
|
||||||
|
|
||||||
|
async void SureClick()
|
||||||
|
{
|
||||||
|
int num = int.Parse(GiftQuantity.text);
|
||||||
|
Debug.Log(uid);
|
||||||
|
Debug.Log(num);
|
||||||
|
Debug.Log(TransferPassword.text);
|
||||||
|
|
||||||
|
bool issuccefull = await Scene_main_jiekou.instance.TransferapplyInfos(uid, num, TransferPassword.text);
|
||||||
|
if (issuccefull)
|
||||||
|
{
|
||||||
|
Destroy(this.gameObject);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CloseClick()
|
||||||
|
{
|
||||||
|
Destroy(this.gameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Update is called once per frame
|
||||||
|
void Update()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,11 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 11b96df38ece1ed458f727827c1b3a1b
|
||||||
|
MonoImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 2
|
||||||
|
defaultReferences: []
|
||||||
|
executionOrder: 0
|
||||||
|
icon: {instanceID: 0}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -8,17 +8,21 @@ public class Giveawayitem : MonoBehaviour
|
|||||||
public Text username;
|
public Text username;
|
||||||
public Text userid;
|
public Text userid;
|
||||||
public Button GiveBtn;
|
public Button GiveBtn;
|
||||||
|
public GameObject GiveawayNumber;
|
||||||
|
|
||||||
|
public Transform canvas;
|
||||||
[HideInInspector]
|
[HideInInspector]
|
||||||
public string uid;
|
public string uid;
|
||||||
void Start()
|
void Start()
|
||||||
{
|
{
|
||||||
GiveBtn.onClick.AddListener(GiveClick);
|
GiveBtn.onClick.AddListener(GiveClick);
|
||||||
|
canvas = GameObject.Find("myCanvas").transform;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GiveClick()
|
void GiveClick()
|
||||||
{
|
{
|
||||||
|
GameObject obj = Instantiate(GiveawayNumber,canvas);
|
||||||
|
obj.GetComponent<GiveawayNumberPanel>().uid= uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update is called once per frame
|
// Update is called once per frame
|
||||||
|
@ -23,9 +23,9 @@ public class transferapply : MonoBehaviour
|
|||||||
|
|
||||||
public async Task<bool> TransferapplyInfo(transferapplyBody body)
|
public async Task<bool> TransferapplyInfo(transferapplyBody body)
|
||||||
{
|
{
|
||||||
Debug.Log(JsonConvert.SerializeObject(body) + "Èë²Î=========");
|
Debug.Log(JsonConvert.SerializeObject(body) + "תÔöÉêÇëÈë²Î=========");
|
||||||
string response = await myWeb.SendRequest(myWeb.URL + "/api/capital/transfer/apply", "POST", JsonConvert.SerializeObject(body), CreateHeaders());
|
string response = await myWeb.SendRequest(myWeb.URL + "/api/capital/transfer/apply", "POST", JsonConvert.SerializeObject(body), CreateHeaders());
|
||||||
Debug.Log(response);
|
Debug.Log("תÔöÉêÇë"+response);
|
||||||
transferResponse info = JsonConvert.DeserializeObject<transferResponse>(response);
|
transferResponse info = JsonConvert.DeserializeObject<transferResponse>(response);
|
||||||
if (info.code == 200)
|
if (info.code == 200)
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,7 @@ public class capitalbalance : MonoBehaviour
|
|||||||
public async Task<CapitalbalanceIndefo> CapitalbalanceInfo()
|
public async Task<CapitalbalanceIndefo> CapitalbalanceInfo()
|
||||||
{
|
{
|
||||||
string response = await myWeb.SendRequest(myWeb.URL + "/api/capital/balance", "GET", "{}", CreateHeaders());
|
string response = await myWeb.SendRequest(myWeb.URL + "/api/capital/balance", "GET", "{}", CreateHeaders());
|
||||||
Debug.Log("签到数据" + response);
|
Debug.Log("资产数据" + response);
|
||||||
CapitalbalanceIndefo capitalbalanceInfo = JsonConvert.DeserializeObject<CapitalbalanceIndefo>(response);
|
CapitalbalanceIndefo capitalbalanceInfo = JsonConvert.DeserializeObject<CapitalbalanceIndefo>(response);
|
||||||
Debug.Log("======" + capitalbalanceInfo.data.water);
|
Debug.Log("======" + capitalbalanceInfo.data.water);
|
||||||
return capitalbalanceInfo;
|
return capitalbalanceInfo;
|
||||||
|
Loading…
Reference in New Issue
Block a user