From 156001285b2cc485f417922670552dda7e6d9f97 Mon Sep 17 00:00:00 2001 From: wulongxiao <2545507770@qq.com> Date: Wed, 27 Nov 2024 22:29:31 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=81=A2=E5=A4=8D=E8=A6=86=E7=9B=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Assets/Scenes/Scene_main.unity | 111 ------------------ .../Scripts/Scene_main/Scene_main_jiekou.cs | 4 +- .../Assets/Scripts/Scene_main/main_shop.cs | 8 +- 3 files changed, 8 insertions(+), 115 deletions(-) diff --git a/TheStrongestSnail/Assets/Scenes/Scene_main.unity b/TheStrongestSnail/Assets/Scenes/Scene_main.unity index 474f55f..ccc4c6e 100644 --- a/TheStrongestSnail/Assets/Scenes/Scene_main.unity +++ b/TheStrongestSnail/Assets/Scenes/Scene_main.unity @@ -6259,117 +6259,6 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 1029618134} m_CullTransparentMesh: 1 ---- !u!1 &1050248874 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 1050248876} - - component: {fileID: 1050248875} - m_Layer: 0 - m_Name: Global - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!114 &1050248875 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1050248874} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 761bde84815251c42a1d655b4e8c2b0d, type: 3} - m_Name: - m_EditorClassIdentifier: - serverResponse: - code: 0 - message: - data: - userId: 0 - userName: - token: - nickName: - headImg: - gender: - birthday: - idCard: - inviteCodeMy: - inviteCodeBind: - bindTime: - station: - cuteNo: - memberTime: - response: - code: 0 - message: - data: - carrySeconds: 0 - gameEscapeRoomResponseVoList: [] - gameEscapeModel: - id: 0 - gameNo: - demonMode: 0 - startTime: - betTime: - countTime: - settleTime: - status: 0 - roomNoKill: - roomNoRemain: - beansCoinAll: 0 - beansCoinKill: 0 - beansCoinRemain: 0 - beansCoinFee: 0 - beansCoinRank: 0 - beansCoinDivide: 0 - realPlayerInfo: - code: 0 - message: - data: - userId: 0 - userName: 0 - token: - nickName: - headImg: - gender: 0 - birthday: - voluteCoin: 0 - beansCoin: 0 - ichorCoin: 0 - idCard: - bank: - realName: - isCert: 0 - inviteCodeMy: - inviteCodeBind: - bindTime: - station: 0 - cuteNo: - memberTime: - isMember: 0 - unionId: 0 ---- !u!4 &1050248876 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1050248874} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 960.40076, y: 1284.435, z: -10.213597} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 0} - m_RootOrder: 4 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} --- !u!1 &1080349907 GameObject: m_ObjectHideFlags: 0 diff --git a/TheStrongestSnail/Assets/Scripts/Scene_main/Scene_main_jiekou.cs b/TheStrongestSnail/Assets/Scripts/Scene_main/Scene_main_jiekou.cs index df81caa..604c75f 100644 --- a/TheStrongestSnail/Assets/Scripts/Scene_main/Scene_main_jiekou.cs +++ b/TheStrongestSnail/Assets/Scripts/Scene_main/Scene_main_jiekou.cs @@ -24,8 +24,8 @@ public class Scene_main_jiekou :Base { instance = this; - testLogo(); - //getInfo(); + //testLogo(); + getPlayerInfo(); // getShopInfo(); } diff --git a/TheStrongestSnail/Assets/Scripts/Scene_main/main_shop.cs b/TheStrongestSnail/Assets/Scripts/Scene_main/main_shop.cs index 97b335d..9935ad4 100644 --- a/TheStrongestSnail/Assets/Scripts/Scene_main/main_shop.cs +++ b/TheStrongestSnail/Assets/Scripts/Scene_main/main_shop.cs @@ -27,8 +27,12 @@ public class main_shop :BaseUIPanel addEventPopUp("未开放", 3f); return; } - // 实例化 Panel 并设置缩放为 0.5 - GameObject.Instantiate(Panel, canvas.transform); + + // await Scene_main_jiekou.instance.ShopInfo(); + //获取商城列表 + Debug.Log("获取商城列表"); + // 实例化 Panel + GameObject.Instantiate(Panel, canvas.transform); } From c42c9208921a08181bd4c26ff2f5d608bcd746ba Mon Sep 17 00:00:00 2001 From: huyulong <1838407198@qq.com> Date: Wed, 27 Nov 2024 23:18:16 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E4=B8=AA=E4=BA=BA=E7=95=8C=E9=9D=A2UI?= =?UTF-8?q?=E9=80=BB=E8=BE=91=E5=92=8C=E6=8E=A5=E5=8F=A3=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resources/LLPrefabs/OrderPanel.prefab | 122 ++++++++ .../Scripts/RealNamePanel/SMFinishPanel.cs | 19 +- .../Scripts/RealNamePanel/ShiMingPanel.cs | 74 +++-- .../Assets/Scripts/lianghaoLL/OrderPanel.cs | 8 +- .../Assets/prefabs/ConvertPanel.prefab | 4 +- .../HYLPrefabs/PersonalCenterPanel.prefab | 274 +----------------- .../prefabs/HYLPrefabs/SMFinishPanel.prefab | 16 + .../prefabs/HYLPrefabs/ShiMingPanel.prefab | 19 ++ 8 files changed, 233 insertions(+), 303 deletions(-) diff --git a/TheStrongestSnail/Assets/Resources/LLPrefabs/OrderPanel.prefab b/TheStrongestSnail/Assets/Resources/LLPrefabs/OrderPanel.prefab index 0631d1e..7240b04 100644 --- a/TheStrongestSnail/Assets/Resources/LLPrefabs/OrderPanel.prefab +++ b/TheStrongestSnail/Assets/Resources/LLPrefabs/OrderPanel.prefab @@ -109,6 +109,7 @@ RectTransform: - {fileID: 5818478777440826116} - {fileID: 7762691159386878876} - {fileID: 4328097647777637692} + - {fileID: 2181120088330738608} m_Father: {fileID: 0} m_RootOrder: 0 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} @@ -874,3 +875,124 @@ MonoBehaviour: m_EditorClassIdentifier: m_HorizontalFit: 0 m_VerticalFit: 2 +--- !u!1001 &6748663287619399101 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 4328097647563504795} + m_Modifications: + - target: {fileID: 4894555910357792268, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_Name + value: retrun_BTN + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_RootOrder + value: 3 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_AnchorMax.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_AnchorMax.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_AnchorMin.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_AnchorMin.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_SizeDelta.x + value: 175 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_SizeDelta.y + value: 155 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_AnchoredPosition.x + value: 472 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_AnchoredPosition.y + value: -1059 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 5044707777241721125, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: retbutton + value: + objectReference: {fileID: 2181120088330738611} + - target: {fileID: 5044707777241721125, guid: dac544bca4358514d949413f04b4421c, type: 3} + propertyPath: ClosureObj + value: + objectReference: {fileID: 4328097647563504792} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: dac544bca4358514d949413f04b4421c, type: 3} +--- !u!224 &2181120088330738608 stripped +RectTransform: + m_CorrespondingSourceObject: {fileID: 4894555910357792269, guid: dac544bca4358514d949413f04b4421c, type: 3} + m_PrefabInstance: {fileID: 6748663287619399101} + m_PrefabAsset: {fileID: 0} +--- !u!114 &2181120088330738611 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 4894555910357792270, guid: dac544bca4358514d949413f04b4421c, type: 3} + m_PrefabInstance: {fileID: 6748663287619399101} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: diff --git a/TheStrongestSnail/Assets/Scripts/RealNamePanel/SMFinishPanel.cs b/TheStrongestSnail/Assets/Scripts/RealNamePanel/SMFinishPanel.cs index 54966d1..ba37280 100644 --- a/TheStrongestSnail/Assets/Scripts/RealNamePanel/SMFinishPanel.cs +++ b/TheStrongestSnail/Assets/Scripts/RealNamePanel/SMFinishPanel.cs @@ -1,18 +1,21 @@ using System.Collections; using System.Collections.Generic; +using TMPro; using UnityEngine; public class SMFinishPanel : MonoBehaviour { - // Start is called before the first frame update - void Start() - { - - } + //姓名 + public TMP_Text inputName; + //身份证号 + public TMP_Text inputIDNum; + //银行卡 + public TMP_Text inputBankNum; - // Update is called once per frame - void Update() + public void UpdatePanel(RealName realName) { - + inputName.text = realName.realName; + inputBankNum.text = realName.bank; + inputIDNum.text = realName.idCard; } } diff --git a/TheStrongestSnail/Assets/Scripts/RealNamePanel/ShiMingPanel.cs b/TheStrongestSnail/Assets/Scripts/RealNamePanel/ShiMingPanel.cs index c92c75a..3b0c81e 100644 --- a/TheStrongestSnail/Assets/Scripts/RealNamePanel/ShiMingPanel.cs +++ b/TheStrongestSnail/Assets/Scripts/RealNamePanel/ShiMingPanel.cs @@ -1,59 +1,91 @@ using System.Collections; using System.Collections.Generic; +using System.Text.RegularExpressions; using System.Threading.Tasks; +using TMPro; using UnityEngine; using UnityEngine.UI; +using UnityEngine.Windows; using static OrderPanel; +//实名认证消息体 +public class RealName +{ + //身份证 + public string idCard; + //银行卡 + public string bank; + //名字 + public string realName; +} + public class ShiMingPanel : MonoBehaviour { //姓名 - public InputField inputName; + public TMP_InputField inputName; //身份证号 - public InputField inputIDNum; + public TMP_InputField inputIDNum; //银行卡 - public InputField inputBankNum; + public TMP_InputField inputBankNum; //手机号 - public InputField inputPhone; + public TMP_InputField inputPhone; //认证按钮 public Button btnProve; - private RealName realName; + //实名认证完成页面 + public GameObject smFinishPanel; + + private RealName realNameMsg = new RealName(); + + //准备请求的头部信息,包含授权令牌 + Dictionary headInfo = new Dictionary(); + // Start is called before the first frame update void Start() { - + btnProve.onClick.AddListener(() => + { + realNameMsg.realName = inputName.text; + realNameMsg.bank = inputBankNum.text; + realNameMsg.idCard = inputIDNum.text; + ReGetOrder(); + }); } // Update is called once per frame void Update() { - + } - //实名认证消息体 - public class RealName - { - //身份证 - public string idCard; - public string bank; - public string realName; - } - //准备请求的头部信息,包含授权令牌 - private Dictionary headInfo = new Dictionary + + public class ReturnMsg { - { "Authorization", Global.global.serverResponse.data.token } - }; + public int code; + public string message; + public string data; + } public async Task ReGetOrder() { + headInfo.Add("Authorization", Global.global.serverResponse.data.token); // 请求体 //异步发送请求 - //string responsel6 = await web.SendRequest(web.URL + "/snail/order/queryPage", "POST", JsonUtility.ToJson(msg), headInfo); + string responsel6 = await web.SendRequest(web.URL + "/snail/user/cert", "POST", JsonUtility.ToJson(realNameMsg), headInfo); - //Debug.Log(responsel6); + ReturnMsg msg = JsonUtility.FromJson(responsel6); + + if (msg.code == 200) + { + Transform parentTransform = transform.parent; + GameObject go = Instantiate(smFinishPanel, parentTransform, false); + go.GetComponent().UpdatePanel(realNameMsg); + Destroy(this.gameObject); + } + Debug.Log(responsel6); + Debug.Log(msg); } } diff --git a/TheStrongestSnail/Assets/Scripts/lianghaoLL/OrderPanel.cs b/TheStrongestSnail/Assets/Scripts/lianghaoLL/OrderPanel.cs index f286df8..e373b0b 100644 --- a/TheStrongestSnail/Assets/Scripts/lianghaoLL/OrderPanel.cs +++ b/TheStrongestSnail/Assets/Scripts/lianghaoLL/OrderPanel.cs @@ -12,7 +12,7 @@ public class OrderPanel : MonoBehaviour private string urlPath = "/snail/order/queryPage"; - + //订单信息 private OrderInfo orderInfo; @@ -70,14 +70,12 @@ public class OrderPanel : MonoBehaviour OrderMsg msg = new OrderMsg() { orderByDesc = 1 }; //准备请求的头部信息,包含授权令牌 - private Dictionary headInfo = new Dictionary - { - { "Authorization", Global.global.serverResponse.data.token } - }; + private Dictionary headInfo = new Dictionary(); // public async Task ReGetOrder() { + headInfo.Add("Authorization", Global.global.serverResponse.data.token); // 请求体 //异步发送请求 string responsel6 = await web.SendRequest(web.URL + "/snail/order/queryPage", "POST", JsonUtility.ToJson(msg), headInfo); diff --git a/TheStrongestSnail/Assets/prefabs/ConvertPanel.prefab b/TheStrongestSnail/Assets/prefabs/ConvertPanel.prefab index 64414f0..df7bc21 100644 --- a/TheStrongestSnail/Assets/prefabs/ConvertPanel.prefab +++ b/TheStrongestSnail/Assets/prefabs/ConvertPanel.prefab @@ -39,8 +39,8 @@ RectTransform: m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0, y: 1} m_AnchorMax: {x: 0, y: 1} - m_AnchoredPosition: {x: 613.18884, y: -480.8161} - m_SizeDelta: {x: 1110.3777, y: 0} + m_AnchoredPosition: {x: 613.18884, y: -126.5} + m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &2608027775408396143 MonoBehaviour: diff --git a/TheStrongestSnail/Assets/prefabs/HYLPrefabs/PersonalCenterPanel.prefab b/TheStrongestSnail/Assets/prefabs/HYLPrefabs/PersonalCenterPanel.prefab index a97f1d8..87b3ebf 100644 --- a/TheStrongestSnail/Assets/prefabs/HYLPrefabs/PersonalCenterPanel.prefab +++ b/TheStrongestSnail/Assets/prefabs/HYLPrefabs/PersonalCenterPanel.prefab @@ -1625,141 +1625,6 @@ MonoBehaviour: m_hasFontAssetChanged: 0 m_baseMaterial: {fileID: 0} m_maskOffset: {x: 0, y: 0, z: 0, w: 0} ---- !u!1 &7365734031856600493 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7365734031856600494} - - component: {fileID: 7365734031856600488} - - component: {fileID: 7365734031856600495} - m_Layer: 5 - m_Name: Text (TMP) - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7365734031856600494 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7365734031856600493} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 7365734032285175081} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 0.00099945, y: -0.00026321} - m_SizeDelta: {x: 388.89, y: 121.48} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7365734031856600488 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7365734031856600493} - m_CullTransparentMesh: 1 ---- !u!114 &7365734031856600495 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7365734031856600493} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_text: "\u5BA2\u670D" - m_isRightToLeft: 0 - m_fontAsset: {fileID: 11400000, guid: ba2f1b18921a5b24bb4aeb3ee4a8e979, type: 2} - m_sharedMaterial: {fileID: -5950493476346735654, guid: ba2f1b18921a5b24bb4aeb3ee4a8e979, type: 2} - m_fontSharedMaterials: [] - m_fontMaterial: {fileID: 0} - m_fontMaterials: [] - m_fontColor32: - serializedVersion: 2 - rgba: 4294967295 - m_fontColor: {r: 1, g: 1, b: 1, a: 1} - m_enableVertexGradient: 0 - m_colorMode: 3 - m_fontColorGradient: - topLeft: {r: 1, g: 1, b: 1, a: 1} - topRight: {r: 1, g: 1, b: 1, a: 1} - bottomLeft: {r: 1, g: 1, b: 1, a: 1} - bottomRight: {r: 1, g: 1, b: 1, a: 1} - m_fontColorGradientPreset: {fileID: 0} - m_spriteAsset: {fileID: 0} - m_tintAllSprites: 0 - m_StyleSheet: {fileID: 0} - m_TextStyleHashCode: -1183493901 - m_overrideHtmlColors: 0 - m_faceColor: - serializedVersion: 2 - rgba: 4294967295 - m_fontSize: 45 - m_fontSizeBase: 45 - m_fontWeight: 400 - m_enableAutoSizing: 0 - m_fontSizeMin: 18 - m_fontSizeMax: 72 - m_fontStyle: 0 - m_HorizontalAlignment: 2 - m_VerticalAlignment: 512 - m_textAlignment: 65535 - m_characterSpacing: 0 - m_wordSpacing: 0 - m_lineSpacing: 0 - m_lineSpacingMax: 0 - m_paragraphSpacing: 0 - m_charWidthMaxAdj: 0 - m_enableWordWrapping: 1 - m_wordWrappingRatios: 0.4 - m_overflowMode: 0 - m_linkedTextComponent: {fileID: 0} - parentLinkedComponent: {fileID: 0} - m_enableKerning: 1 - m_enableExtraPadding: 0 - checkPaddingRequired: 0 - m_isRichText: 1 - m_parseCtrlCharacters: 1 - m_isOrthographic: 1 - m_isCullingEnabled: 0 - m_horizontalMapping: 0 - m_verticalMapping: 0 - m_uvLineOffset: 0 - m_geometrySortingOrder: 0 - m_IsTextObjectScaleStatic: 0 - m_VertexBufferAutoSizeReduction: 0 - m_useMaxVisibleDescender: 1 - m_pageToDisplay: 1 - m_margin: {x: 0, y: 0, z: 0, w: 0} - m_isUsingLegacyAnimationComponent: 0 - m_isVolumetricText: 0 - m_hasFontAssetChanged: 0 - m_baseMaterial: {fileID: 0} - m_maskOffset: {x: 0, y: 0, z: 0, w: 0} --- !u!1 &7365734031869353532 GameObject: m_ObjectHideFlags: 0 @@ -2378,16 +2243,14 @@ MonoBehaviour: transformationBtn: {fileID: 7365734032134663387} exchangeBtn: {fileID: 7365734031970685140} accountsecurityBtn: {fileID: 7365734033068930756} - customerserviceBtn: {fileID: 7365734032285175082} editPrefabs: {fileID: 6960989441060764512, guid: 3490098842d7403459677ad0a9d21c3b, type: 3} - myorderPrefabs: {fileID: 0} - realnamePrefabs: {fileID: 0} - receivingaddressPrefabs: {fileID: 0} - conversionPrefabs: {fileID: 0} - transformationPrefabs: {fileID: 0} - exchangePrefabs: {fileID: 0} - accountsecurityPrefabs: {fileID: 0} - customerservicePrefabs: {fileID: 0} + myorderPrefabs: {fileID: 4328097647563504792, guid: c83e83a747149a24889cec00adeee2de, type: 3} + realnamePrefabs: {fileID: 3485144752579768855, guid: 15649166b70c43240967a238cd4d632b, type: 3} + receivingaddressPrefabs: {fileID: 4499171977774247193, guid: b7a2ccb5cba723240b3b23ecbfd825e2, type: 3} + conversionPrefabs: {fileID: 1551424549758334540, guid: 0818e16ae17cf3f4b959a0a1c9bf5e0b, type: 3} + transformationPrefabs: {fileID: 5777725415565958671, guid: ac8d6e0263df8e7479c3b9e87ae8d394, type: 3} + exchangePrefabs: {fileID: 2824353034306600141, guid: 561440df45b228349a409964d7f37450, type: 3} + accountsecurityPrefabs: {fileID: 9051052528993816625, guid: cf8157ba97bdda94494fae6a9cc56ff2, type: 3} --- !u!1 &7365734032111111873 GameObject: m_ObjectHideFlags: 0 @@ -2712,128 +2575,6 @@ MonoBehaviour: m_OnClick: m_PersistentCalls: m_Calls: [] ---- !u!1 &7365734032285175080 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 7365734032285175081} - - component: {fileID: 7365734032285175076} - - component: {fileID: 7365734032285175083} - - component: {fileID: 7365734032285175082} - m_Layer: 5 - m_Name: customerserviceBtn - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &7365734032285175081 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7365734032285175080} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 7365734031856600494} - m_Father: {fileID: 7365734032714701189} - m_RootOrder: 7 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &7365734032285175076 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7365734032285175080} - m_CullTransparentMesh: 1 ---- !u!114 &7365734032285175083 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7365734032285175080} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 21300000, guid: 429b1887ae0b8ac4f8cce94addb0b496, type: 3} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &7365734032285175082 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 7365734032285175080} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 7365734032285175083} - m_OnClick: - m_PersistentCalls: - m_Calls: [] --- !u!1 &7365734032353139181 GameObject: m_ObjectHideFlags: 0 @@ -3224,7 +2965,6 @@ RectTransform: - {fileID: 7365734032134663386} - {fileID: 7365734031970685147} - {fileID: 7365734033068930763} - - {fileID: 7365734032285175081} m_Father: {fileID: 7365734033004688838} m_RootOrder: 2 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} diff --git a/TheStrongestSnail/Assets/prefabs/HYLPrefabs/SMFinishPanel.prefab b/TheStrongestSnail/Assets/prefabs/HYLPrefabs/SMFinishPanel.prefab index 4917324..028a71a 100644 --- a/TheStrongestSnail/Assets/prefabs/HYLPrefabs/SMFinishPanel.prefab +++ b/TheStrongestSnail/Assets/prefabs/HYLPrefabs/SMFinishPanel.prefab @@ -1295,6 +1295,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 9180338299762767603} + - component: {fileID: -8900250717877970309} - component: {fileID: 9180338299762767601} - component: {fileID: 9180338299762767602} m_Layer: 5 @@ -1328,6 +1329,21 @@ RectTransform: m_AnchoredPosition: {x: 7.0596, y: -48.1713} m_SizeDelta: {x: 1185.9861, y: 1269.5222} m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &-8900250717877970309 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 9180338299762767612} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: c62e20e09a7c2b149b3eff923e89874c, type: 3} + m_Name: + m_EditorClassIdentifier: + inputName: {fileID: 9180338299091930227} + inputIDNum: {fileID: 9180338299743217749} + inputBankNum: {fileID: 9180338298789206889} --- !u!222 &9180338299762767601 CanvasRenderer: m_ObjectHideFlags: 0 diff --git a/TheStrongestSnail/Assets/prefabs/HYLPrefabs/ShiMingPanel.prefab b/TheStrongestSnail/Assets/prefabs/HYLPrefabs/ShiMingPanel.prefab index bdcafa1..138b76e 100644 --- a/TheStrongestSnail/Assets/prefabs/HYLPrefabs/ShiMingPanel.prefab +++ b/TheStrongestSnail/Assets/prefabs/HYLPrefabs/ShiMingPanel.prefab @@ -3825,6 +3825,7 @@ GameObject: m_Component: - component: {fileID: 3485144752579768852} - component: {fileID: 3485144752579768850} + - component: {fileID: 8391852897893681156} - component: {fileID: 3485144752579768853} m_Layer: 5 m_Name: ShiMingPanel @@ -3867,6 +3868,24 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 3485144752579768855} m_CullTransparentMesh: 1 +--- !u!114 &8391852897893681156 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 3485144752579768855} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 39c81b58d2f7a0e4087b7dcff84082ef, type: 3} + m_Name: + m_EditorClassIdentifier: + inputName: {fileID: 3485144751743269890} + inputIDNum: {fileID: 3485144752410830448} + inputBankNum: {fileID: 3485144751451059108} + inputPhone: {fileID: 3485144750604374056} + btnProve: {fileID: 3485144750615921453} + smFinishPanel: {fileID: 9180338299762767612, guid: 78183fe970ab5ef41a9ef3204049b95b, type: 3} --- !u!114 &3485144752579768853 MonoBehaviour: m_ObjectHideFlags: 0 From cd00ac298d5564128c5cb1a95a5b2cd54f5df54d Mon Sep 17 00:00:00 2001 From: wulongxiao <2545507770@qq.com> Date: Wed, 27 Nov 2024 23:22:34 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E5=95=86=E5=9F=8E=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E6=81=A2=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Scripts/Scene_main/Scene_main_jiekou.cs | 21 +++++++++++++++---- .../Assets/Scripts/Scene_main/main_shop.cs | 2 +- .../Assets/Scripts/Scene_shop/shopPanel.cs | 19 +++++++++++++++-- .../Scripts/UI_contorl_wlx/ui_huodong.cs | 2 +- .../Assets/prefabs/shopPanel.prefab | 21 +++++++++++++++++++ 5 files changed, 57 insertions(+), 8 deletions(-) diff --git a/TheStrongestSnail/Assets/Scripts/Scene_main/Scene_main_jiekou.cs b/TheStrongestSnail/Assets/Scripts/Scene_main/Scene_main_jiekou.cs index 604c75f..3a7f396 100644 --- a/TheStrongestSnail/Assets/Scripts/Scene_main/Scene_main_jiekou.cs +++ b/TheStrongestSnail/Assets/Scripts/Scene_main/Scene_main_jiekou.cs @@ -14,9 +14,10 @@ public class Scene_main_jiekou :Base //商城信息 - public MallResponsePro _mallResponsePro;//商城列表结构体 + private MallResponsePro _mallResponsePro;//商城列表结构体 private getMallList21 _getMallList21;//商城列表获取方法 - + //商城info字典 + public Dictionary shopItemDic; // Start is called before the first frame update @@ -25,7 +26,7 @@ public class Scene_main_jiekou :Base instance = this; //testLogo(); - getPlayerInfo(); + //getPlayerInfo(); // getShopInfo(); } @@ -47,14 +48,26 @@ public class Scene_main_jiekou :Base } + public async Task ShopInfo() { + //提前清空 + shopItemDic = null; + _mallResponsePro = null; + _getMallList21 = null; + + + //重写写入 _mallResponsePro = new MallResponsePro(); _getMallList21 = new getMallList21(); - _mallResponsePro = await _getMallList21.getMallList(1, 1, 20); + foreach (ProductPro go in _mallResponsePro.Data.DataList) + { + shopItemDic.Add(go.ProductId,go); + } + } diff --git a/TheStrongestSnail/Assets/Scripts/Scene_main/main_shop.cs b/TheStrongestSnail/Assets/Scripts/Scene_main/main_shop.cs index 9935ad4..869519f 100644 --- a/TheStrongestSnail/Assets/Scripts/Scene_main/main_shop.cs +++ b/TheStrongestSnail/Assets/Scripts/Scene_main/main_shop.cs @@ -28,7 +28,7 @@ public class main_shop :BaseUIPanel return; } - // await Scene_main_jiekou.instance.ShopInfo(); + //await Scene_main_jiekou.instance.ShopInfo(); //获取商城列表 Debug.Log("获取商城列表"); // 实例化 Panel diff --git a/TheStrongestSnail/Assets/Scripts/Scene_shop/shopPanel.cs b/TheStrongestSnail/Assets/Scripts/Scene_shop/shopPanel.cs index 23285d9..c68c2b6 100644 --- a/TheStrongestSnail/Assets/Scripts/Scene_shop/shopPanel.cs +++ b/TheStrongestSnail/Assets/Scripts/Scene_shop/shopPanel.cs @@ -5,7 +5,22 @@ using UnityEngine; using DG.Tweening; public class shopPanel: ui_huodong -{ +{ + public List itemInfos = new List(); + + void initShop() + { + + int index= Scene_main_jiekou.instance._mallResponsePro.Data.TotalCount;//商城的商品数量 + + foreach (itemInfo item in itemInfos) + { + if (index>0) + { + item.gameObject.SetActive(true); + + } + } + } - } diff --git a/TheStrongestSnail/Assets/Scripts/UI_contorl_wlx/ui_huodong.cs b/TheStrongestSnail/Assets/Scripts/UI_contorl_wlx/ui_huodong.cs index 95aae1a..562a32b 100644 --- a/TheStrongestSnail/Assets/Scripts/UI_contorl_wlx/ui_huodong.cs +++ b/TheStrongestSnail/Assets/Scripts/UI_contorl_wlx/ui_huodong.cs @@ -11,7 +11,7 @@ public class ui_huodong :main_BaseShowPanel [Header("面板,请和按钮一一对应")] public List panels=new List(); // Start is called before the first frame update - void Start() + public virtual void Start() { base.showPanel(base._panel); diff --git a/TheStrongestSnail/Assets/prefabs/shopPanel.prefab b/TheStrongestSnail/Assets/prefabs/shopPanel.prefab index a6e6a31..ef4bbc2 100644 --- a/TheStrongestSnail/Assets/prefabs/shopPanel.prefab +++ b/TheStrongestSnail/Assets/prefabs/shopPanel.prefab @@ -9,6 +9,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 5363579444209329408} + - component: {fileID: 2302796054771788344} m_Layer: 5 m_Name: shopPanel m_TagString: Untagged @@ -38,6 +39,21 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 0, y: 0} m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &2302796054771788344 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 5363579444209329409} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: e3c192bd726c790488c8fe8895226742, type: 3} + m_Name: + m_EditorClassIdentifier: + _panel: {fileID: 957974660627982085} + btns: [] + panels: [] --- !u!1001 &5363579443773024874 PrefabInstance: m_ObjectHideFlags: 0 @@ -144,6 +160,11 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 5126270615579512174, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3} m_PrefabInstance: {fileID: 5363579443773024874} m_PrefabAsset: {fileID: 0} +--- !u!1 &957974660627982085 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 5126270615579512175, guid: 4e48ee49e456fad4887407d7ee921b35, type: 3} + m_PrefabInstance: {fileID: 5363579443773024874} + m_PrefabAsset: {fileID: 0} --- !u!1001 &5363579444857241352 PrefabInstance: m_ObjectHideFlags: 0