转增接口所有接口完成接入

This commit is contained in:
liuliang 2025-01-04 15:20:01 +08:00
parent 63dde9174f
commit 4a222051a8
8 changed files with 1637 additions and 5 deletions

File diff suppressed because it is too large Load Diff

View File

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

View File

@ -97,6 +97,7 @@ MonoBehaviour:
username: {fileID: 3835179725328637314}
userid: {fileID: 3835179723944946966}
GiveBtn: {fileID: 3835179723751752291}
GiveawayNumber: {fileID: 8191181331549273727, guid: d180986aa70c1c1439d24ec6aa141683, type: 3}
uid:
--- !u!1 &3835179723641606691
GameObject:

View 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()
{
}
}

View File

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

View File

@ -8,17 +8,21 @@ public class Giveawayitem : MonoBehaviour
public Text username;
public Text userid;
public Button GiveBtn;
public GameObject GiveawayNumber;
public Transform canvas;
[HideInInspector]
public string uid;
void Start()
{
GiveBtn.onClick.AddListener(GiveClick);
canvas = GameObject.Find("myCanvas").transform;
}
void GiveClick()
{
{
GameObject obj = Instantiate(GiveawayNumber,canvas);
obj.GetComponent<GiveawayNumberPanel>().uid= uid;
}
// Update is called once per frame

View File

@ -23,9 +23,9 @@ public class transferapply : MonoBehaviour
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());
Debug.Log(response);
Debug.Log("תÔöÉêÇë"+response);
transferResponse info = JsonConvert.DeserializeObject<transferResponse>(response);
if (info.code == 200)
{

View File

@ -24,7 +24,7 @@ public class capitalbalance : MonoBehaviour
public async Task<CapitalbalanceIndefo> CapitalbalanceInfo()
{
string response = await myWeb.SendRequest(myWeb.URL + "/api/capital/balance", "GET", "{}", CreateHeaders());
Debug.Log("签到数据" + response);
Debug.Log("资产数据" + response);
CapitalbalanceIndefo capitalbalanceInfo = JsonConvert.DeserializeObject<CapitalbalanceIndefo>(response);
Debug.Log("======" + capitalbalanceInfo.data.water);
return capitalbalanceInfo;