调整UI
This commit is contained in:
parent
58d0d0d961
commit
cf3e3b01b6
@ -2066,6 +2066,14 @@ MonoBehaviour:
|
|||||||
retbutton: {fileID: 0}
|
retbutton: {fileID: 0}
|
||||||
ClosureObj: {fileID: 0}
|
ClosureObj: {fileID: 0}
|
||||||
_mainBTN: {fileID: 332514051}
|
_mainBTN: {fileID: 332514051}
|
||||||
|
_getProductResponse:
|
||||||
|
code: 0
|
||||||
|
message:
|
||||||
|
Data:
|
||||||
|
PageNo: 0
|
||||||
|
PageSize: 0
|
||||||
|
TotalCount: 0
|
||||||
|
DataList: []
|
||||||
--- !u!114 &278122031
|
--- !u!114 &278122031
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -2527,8 +2535,8 @@ MonoBehaviour:
|
|||||||
BTN7: {fileID: 1901054682}
|
BTN7: {fileID: 1901054682}
|
||||||
BTN8: {fileID: 476418689}
|
BTN8: {fileID: 476418689}
|
||||||
BTN9: {fileID: 1936607147}
|
BTN9: {fileID: 1936607147}
|
||||||
BTN10: {fileID: 0}
|
BTN10: {fileID: 1181500911}
|
||||||
BTN11: {fileID: 0}
|
BTN11: {fileID: 677536727}
|
||||||
panel5: {fileID: 4940716481564219981, guid: caa78c4293daf7d46a16e55bff3cef69, type: 3}
|
panel5: {fileID: 4940716481564219981, guid: caa78c4293daf7d46a16e55bff3cef69, type: 3}
|
||||||
panel6: {fileID: 8100220736890640020, guid: 5864359501d16654890de332a070efdc, type: 3}
|
panel6: {fileID: 8100220736890640020, guid: 5864359501d16654890de332a070efdc, type: 3}
|
||||||
panel7: {fileID: 3340979652164545499, guid: 8f84b26647447444ab4ae056aa5fa849, type: 3}
|
panel7: {fileID: 3340979652164545499, guid: 8f84b26647447444ab4ae056aa5fa849, type: 3}
|
||||||
|
@ -19,6 +19,9 @@ public class Scene_main_jiekou :Base
|
|||||||
//商城info字典
|
//商城info字典
|
||||||
public Dictionary<int, ProductPro> shopItemDic = new Dictionary<int, ProductPro>();
|
public Dictionary<int, ProductPro> shopItemDic = new Dictionary<int, ProductPro>();
|
||||||
|
|
||||||
|
public getProductResponse _getProductResponse;
|
||||||
|
|
||||||
|
|
||||||
// Start is called before the first frame update
|
// Start is called before the first frame update
|
||||||
|
|
||||||
private void Awake()
|
private void Awake()
|
||||||
@ -47,9 +50,6 @@ public class Scene_main_jiekou :Base
|
|||||||
_realPlayerInfo = await _queryPlayerInfo.QueryPlayerInfoPro();
|
_realPlayerInfo = await _queryPlayerInfo.QueryPlayerInfoPro();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public async Task ShopInfo()
|
public async Task ShopInfo()
|
||||||
{
|
{
|
||||||
// 每次调用时清空字典,确保是最新数据
|
// 每次调用时清空字典,确保是最新数据
|
||||||
@ -75,5 +75,16 @@ public class Scene_main_jiekou :Base
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task ShopItemDetail(int id)
|
||||||
|
{
|
||||||
|
_getProductResponse = null;
|
||||||
|
|
||||||
|
productInfo22 _productInfo22 = new productInfo22();
|
||||||
|
_getProductResponse = await _productInfo22.productInfo(id);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -34,8 +34,9 @@ public class shopPanel: ui_huodong
|
|||||||
// 更新当前 itemInfo 显示项
|
// 更新当前 itemInfo 显示项
|
||||||
itemInfos[index].gameObject.SetActive(true); // 显示当前项
|
itemInfos[index].gameObject.SetActive(true); // 显示当前项
|
||||||
itemInfos[index].initShow(go.Value.ProductId, go.Value.ProductName,go.Value.Price.ToString());
|
itemInfos[index].initShow(go.Value.ProductId, go.Value.ProductName,go.Value.Price.ToString());
|
||||||
itemInfos[index].GetComponent<Button>().onClick.AddListener(()=> {
|
itemInfos[index].GetComponent<Button>().onClick.AddListener(async()=> {
|
||||||
GameObject.Instantiate(Panel, GameObject.Find("Canvas").transform).GetComponent<wokePanel>().initShow(go.Value.ProductName, go.Value.ProductName, go.Value.Price.ToString(),"²âÊÔ") ;
|
await Scene_main_jiekou.instance.ShopItemDetail(go.Value.ProductId);
|
||||||
|
GameObject.Instantiate(Panel, GameObject.Find("Canvas").transform).GetComponent<wokePanel>().initShow(go.Value.ProductName, go.Value.ProductName, go.Value.Price.ToString(), Scene_main_jiekou.instance._getProductResponse.Data.DataList[0].ProductName);
|
||||||
});
|
});
|
||||||
index++;
|
index++;
|
||||||
|
|
||||||
@ -48,6 +49,8 @@ public class shopPanel: ui_huodong
|
|||||||
itemInfos[index].gameObject.SetActive(false); // 隐藏多余项
|
itemInfos[index].gameObject.SetActive(false); // 隐藏多余项
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user