接口接完啦!!!!!!!!

This commit is contained in:
huyulong 2024-11-27 19:02:29 +08:00
parent c28f3adac5
commit 7695960f14
7 changed files with 99 additions and 31 deletions

View File

@ -25,7 +25,8 @@ public class AddressPanel : MonoBehaviour
GameObject addres = GameObject.Instantiate(addressPrefab,trans); GameObject addres = GameObject.Instantiate(addressPrefab,trans);
addres.name = "address_" + i; addres.name = "address_" + i;
addressItem item = addres.GetComponent<addressItem>(); addressItem item = addres.GetComponent<addressItem>();
item.SetInfo(); Address address = adressResponse.data[i];
item.SetInfo(address);
} }

View File

@ -0,0 +1,36 @@
using System.Collections;
using System.Collections.Generic;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
public class NewAddressPanel : MonoBehaviour
{
public Button submitBtn;//±£´æ°´Å¥
public TMP_InputField nameInput;
public TMP_InputField telInput;
public TMP_InputField addresInput;
public TMP_InputField detailInput;
// Start is called before the first frame update
void Start()
{
submitBtn.onClick.AddListener(NewAddress);
}
//
public async void NewAddress()
{
newAddress81 newAddress81 = new newAddress81();
newAddressResponse newAddressResponse = new newAddressResponse();
newAddressResponse = await newAddress81.newAddress(nameInput.text,telInput.text,addresInput.text,detailInput.text);
}
// Update is called once per frame
void Update()
{
}
}

View File

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

View File

@ -23,8 +23,10 @@ public class addressItem : MonoBehaviour
} }
public void SetInfo() public void SetInfo(Address address)
{ {
nameTxt.text = address.receiveName;
addressTxt.text = address.address;
telTxt.text = address.receivePhone;
} }
} }

View File

@ -12,7 +12,7 @@ public class newAddress81 : MonoBehaviour
//public async Task<KnightBetResult> queryKnightBetResult(int KnightId) // 5.2.2//需传入KightId //public async Task<KnightBetResult> queryKnightBetResult(int KnightId) // 5.2.2//需传入KightId
public async Task<newAddressResponse> newAddress(string receiveName, string receivePhone,string area, string address) public async Task<newAddressResponse> newAddress(string receiveName, string receivePhone,string area, string address)
{ {
// 准备请求的头部信息,包含授权令牌 // 准备请求的头部信息,包含授权令牌
Dictionary<string, string> head81 = new Dictionary<string, string> Dictionary<string, string> head81 = new Dictionary<string, string>

View File

@ -2772,6 +2772,7 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 2987401724823548006} - component: {fileID: 2987401724823548006}
- component: {fileID: 2987401724823548008} - component: {fileID: 2987401724823548008}
- component: {fileID: 6307088045765265409}
- component: {fileID: 2987401724823548007} - component: {fileID: 2987401724823548007}
m_Layer: 5 m_Layer: 5
m_Name: NewAddressPanel m_Name: NewAddressPanel
@ -2812,6 +2813,23 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2987401724823548005} m_GameObject: {fileID: 2987401724823548005}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!114 &6307088045765265409
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2987401724823548005}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f8df579c5d9c49946b093851a79e3a47, type: 3}
m_Name:
m_EditorClassIdentifier:
submitBtn: {fileID: 2987401723913972211}
nameInput: {fileID: 2987401724823610980}
telInput: {fileID: 2987401723687042710}
addresInput: {fileID: 2987401724969363256}
detailInput: {fileID: 2987401724644137107}
--- !u!114 &2987401724823548007 --- !u!114 &2987401724823548007
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -948,27 +948,27 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724014986002, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724014986002, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724014986002, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724014986002, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchorMin.y propertyPath: m_AnchorMin.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724014986002, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724014986002, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 870.8313 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724014986002, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724014986002, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 122.7744 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724014986002, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724014986002, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: 435.41565 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724014986002, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724014986002, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: -462.8004 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724065773185, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724065773185, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
@ -976,27 +976,27 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724358874646, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724358874646, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724358874646, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724358874646, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchorMin.y propertyPath: m_AnchorMin.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724358874646, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724358874646, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 870.8313 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724358874646, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724358874646, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 122.7744 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724358874646, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724358874646, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: 435.41565 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724358874646, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724358874646, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: -61.3872 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724360385202, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724360385202, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_fontAsset propertyPath: m_fontAsset
@ -1044,51 +1044,51 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724514752353, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724514752353, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724514752353, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724514752353, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchorMin.y propertyPath: m_AnchorMin.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724514752353, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724514752353, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 870.8313 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724514752353, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724514752353, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 122.7744 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724514752353, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724514752353, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: 435.41565 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724514752353, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724514752353, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: -328.996 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724723304547, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724723304547, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724723304547, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724723304547, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchorMin.y propertyPath: m_AnchorMin.y
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724723304547, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724723304547, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_SizeDelta.x propertyPath: m_SizeDelta.x
value: 870.8313 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724723304547, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724723304547, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 122.7744 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724723304547, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724723304547, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: 435.41565 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724723304547, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724723304547, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: -195.19159 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724787116905, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724787116905, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_fontAsset propertyPath: m_fontAsset
@ -1120,7 +1120,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724823548005, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724823548005, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 0 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2987401724823548006, guid: eff2da918a3a81741b2b794c44b1545e, type: 3} - target: {fileID: 2987401724823548006, guid: eff2da918a3a81741b2b794c44b1545e, type: 3}
propertyPath: m_Pivot.x propertyPath: m_Pivot.x
@ -1586,7 +1586,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4499171977555058829, guid: b7a2ccb5cba723240b3b23ecbfd825e2, type: 3} - target: {fileID: 4499171977555058829, guid: b7a2ccb5cba723240b3b23ecbfd825e2, type: 3}
propertyPath: m_SizeDelta.y propertyPath: m_SizeDelta.y
value: 0 value: -937.7574
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4499171977774247193, guid: b7a2ccb5cba723240b3b23ecbfd825e2, type: 3} - target: {fileID: 4499171977774247193, guid: b7a2ccb5cba723240b3b23ecbfd825e2, type: 3}
propertyPath: m_Name propertyPath: m_Name
@ -1594,7 +1594,7 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4499171977774247193, guid: b7a2ccb5cba723240b3b23ecbfd825e2, type: 3} - target: {fileID: 4499171977774247193, guid: b7a2ccb5cba723240b3b23ecbfd825e2, type: 3}
propertyPath: m_IsActive propertyPath: m_IsActive
value: 1 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4499171977774247194, guid: b7a2ccb5cba723240b3b23ecbfd825e2, type: 3} - target: {fileID: 4499171977774247194, guid: b7a2ccb5cba723240b3b23ecbfd825e2, type: 3}
propertyPath: m_Pivot.x propertyPath: m_Pivot.x