公告信息,首充接口的接入以及工会接口的接入
This commit is contained in:
parent
7b32517c73
commit
7b08a6313a
1327
meng_yao/Assets/Resources/Prefabs/Ghitem.prefab
Normal file
1327
meng_yao/Assets/Resources/Prefabs/Ghitem.prefab
Normal file
File diff suppressed because it is too large
Load Diff
7
meng_yao/Assets/Resources/Prefabs/Ghitem.prefab.meta
Normal file
7
meng_yao/Assets/Resources/Prefabs/Ghitem.prefab.meta
Normal file
@ -0,0 +1,7 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4e234a76f155d14e9e3be9e83d6393f
|
||||
PrefabImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -92,12 +92,12 @@ GameObject:
|
||||
- component: {fileID: 5601059987316987915}
|
||||
- component: {fileID: 8393230688338823417}
|
||||
m_Layer: 5
|
||||
m_Name: Image
|
||||
m_Name: DoubleLogo
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &8304440133534458112
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -369,8 +369,9 @@ GameObject:
|
||||
- component: {fileID: 3410538237006333019}
|
||||
- component: {fileID: 3852483575348601689}
|
||||
- component: {fileID: 4834314785377115921}
|
||||
- component: {fileID: 766062605957062376}
|
||||
m_Layer: 5
|
||||
m_Name: first_charge_2
|
||||
m_Name: first_chargeitem
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
@ -438,6 +439,25 @@ MonoBehaviour:
|
||||
m_FillOrigin: 0
|
||||
m_UseSpriteMesh: 0
|
||||
m_PixelsPerUnitMultiplier: 1
|
||||
--- !u!114 &766062605957062376
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 4045721540850540477}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f20f896befa6e0841b06b4265b736e58, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
PackagesName: {fileID: 4750461108167179589}
|
||||
Number: {fileID: 1585055348056735858}
|
||||
price: {fileID: 5627191032766513765}
|
||||
doubleLogo: {fileID: 8393230688338823417}
|
||||
id: 0
|
||||
BuyBtn: {fileID: 4384280633790099140}
|
||||
chargePanel: {fileID: 0}
|
||||
--- !u!1 &5996865222481068267
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
File diff suppressed because it is too large
Load Diff
@ -32,15 +32,25 @@ public class GgTanchuang : mount
|
||||
|
||||
}
|
||||
|
||||
private void Display_pop_up_window()
|
||||
private async void Display_pop_up_window()
|
||||
{
|
||||
GgPanel.DOScale(Deflate, 0.3f).SetEase(Ease.OutBack);
|
||||
hdtxbg.sprite = GgglDownsp;
|
||||
StartCoroutine(Magnify(GgPanel));
|
||||
|
||||
NoticeIndfo noticeIndfo = await Scene_main_jiekou.instance.NoticeInfos(1);
|
||||
string n;
|
||||
if (noticeIndfo.Data.exist == 0)
|
||||
{
|
||||
n = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
n = noticeIndfo.Data.notice.content;
|
||||
}
|
||||
|
||||
|
||||
List<BoxType> boxTypes = new List<BoxType>();
|
||||
boxTypes.Add(new BoxType { Name = "", prompt = "", Type = 9,widthnum =700,WidthHeight =650 ,content = "内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容内容" }) ;
|
||||
boxTypes.Add(new BoxType { Name = "", prompt = "", Type = 9,widthnum =700,WidthHeight =650 ,content = n }) ;
|
||||
boxTypes.Add(new BoxType { Name = "", prompt = "确认", Type = 11 });
|
||||
GameObject gameObject = add_pop_up();
|
||||
gameObject.transform.SetParent(canvas);
|
||||
@ -53,7 +63,7 @@ public class GgTanchuang : mount
|
||||
gameObject.GetComponent<input_box_pop_up_window>().minHeight = 800;//设置最低高度
|
||||
gameObject.GetComponent<input_box_pop_up_window>().setScrollMode(0);//设置滚动模式为滚动
|
||||
//gameObject.GetComponent<input_box_pop_up_window>().setScrollMode(0);//设置滚动模式为自动填充
|
||||
List<GameObject> gameObjects = gameObject.GetComponent<input_box_pop_up_window>().updateUI(boxTypes, "公告");//测试输入框回调处理
|
||||
List<GameObject> gameObjects = gameObject.GetComponent<input_box_pop_up_window>().updateUI(boxTypes, noticeIndfo.Data.notice.title);//²âÊÔÊäÈë¿ò»Øµ÷´¦Àí
|
||||
gameObjects[1].GetComponent<input_box_pop_up_window_item>().register_click(async (BoxType boxType, int type) =>//登录确定或取消
|
||||
{
|
||||
if (type == 1)
|
||||
|
@ -1,5 +1,6 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
|
||||
public class FirstChargePanel : MonoBehaviour
|
||||
@ -8,9 +9,27 @@ public class FirstChargePanel : MonoBehaviour
|
||||
public GameObject firstitempr;
|
||||
public Transform Connact;
|
||||
|
||||
void Start()
|
||||
private void OnEnable()
|
||||
{
|
||||
|
||||
Init();
|
||||
}
|
||||
|
||||
async void Init()
|
||||
{
|
||||
productListResponse productListResponse = await Scene_main_jiekou.instance.ProductLists();
|
||||
for (int i = 0; i < productListResponse.Data.Count; i++)
|
||||
{
|
||||
GameObject obj = Instantiate(firstitempr,Connact);
|
||||
obj.GetComponent<FirstChargeitem>().PackagesName.text = productListResponse.Data[i].Name;
|
||||
obj.GetComponent<FirstChargeitem>().Number.text = productListResponse.Data[i].Amount.ToString();
|
||||
obj.GetComponent<FirstChargeitem>().price.text = "£¤"+productListResponse.Data[i].Price.ToString();
|
||||
obj.GetComponent<FirstChargeitem>().id = productListResponse.Data[i].Id;
|
||||
obj.GetComponent<FirstChargeitem>().chargePanel = this;
|
||||
if (productListResponse.Data[i].first_status == 1)
|
||||
{
|
||||
obj.GetComponent<FirstChargeitem>().doubleLogo.gameObject.SetActive(true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
38
meng_yao/Assets/script/scene_Main/ui/FirstChargeitem.cs
Normal file
38
meng_yao/Assets/script/scene_Main/ui/FirstChargeitem.cs
Normal file
@ -0,0 +1,38 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class FirstChargeitem : MonoBehaviour
|
||||
{
|
||||
|
||||
public Text PackagesName;
|
||||
public Text Number;
|
||||
public Text price;
|
||||
public Image doubleLogo;
|
||||
public int id;
|
||||
public Button BuyBtn;
|
||||
|
||||
[HideInInspector]
|
||||
public FirstChargePanel chargePanel;
|
||||
void Start()
|
||||
{
|
||||
BuyBtn.onClick.AddListener(BuyClick);
|
||||
}
|
||||
|
||||
async void BuyClick()
|
||||
{
|
||||
bool issucceffull= await Scene_main_jiekou.instance.BuyProducts(id);
|
||||
if (issucceffull)
|
||||
{
|
||||
Debug.Log("Íê³É¹ºÂò½Ó¿Ú");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
meng_yao/Assets/script/scene_Main/ui/FirstChargeitem.cs.meta
Normal file
11
meng_yao/Assets/script/scene_Main/ui/FirstChargeitem.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f20f896befa6e0841b06b4265b736e58
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -11,6 +11,8 @@ public class GhItem : MonoBehaviour
|
||||
public Text QqText;
|
||||
public Button IdBtn;
|
||||
public Text IdText;
|
||||
public Text username;
|
||||
|
||||
Clipboard clipboard = new Clipboard();
|
||||
void Start()
|
||||
{
|
||||
|
45
meng_yao/Assets/script/scene_Main/ui/GhPanel.cs
Normal file
45
meng_yao/Assets/script/scene_Main/ui/GhPanel.cs
Normal file
@ -0,0 +1,45 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Unity.VisualScripting;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UI;
|
||||
|
||||
public class GhPanel : MonoBehaviour
|
||||
{
|
||||
public GameObject Ghitemprefab;
|
||||
public Transform Connact;
|
||||
public Text Introduceytext;
|
||||
|
||||
List<GameObject> ghlist = new List<GameObject>();
|
||||
async void OnEnable()
|
||||
{
|
||||
ConventionIndfo info = await Scene_main_jiekou.instance.ConventionInfos();
|
||||
Introduceytext.text = info.Data.intro_text;
|
||||
for (int i = 0; i < info.Data.members.Length; i++)
|
||||
{
|
||||
GameObject obj = Instantiate(Ghitemprefab, Connact);
|
||||
ghlist.Add(obj);
|
||||
obj.GetComponent<GhItem>().IdText.text = "ID:"+info.Data.members[i].uid;
|
||||
obj.GetComponent<GhItem>().username.text = info.Data.members[i].name;
|
||||
obj.GetComponent<GhItem>().WxText.text = info.Data.members[i].wechat;
|
||||
obj.GetComponent<GhItem>().QqText.text = info.Data.members[i].qq;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void OnDisable()
|
||||
{
|
||||
foreach (GameObject obj in ghlist)
|
||||
{
|
||||
Destroy(obj);
|
||||
}
|
||||
ghlist.Clear();
|
||||
}
|
||||
|
||||
|
||||
// Update is called once per frame
|
||||
void Update()
|
||||
{
|
||||
|
||||
}
|
||||
}
|
11
meng_yao/Assets/script/scene_Main/ui/GhPanel.cs.meta
Normal file
11
meng_yao/Assets/script/scene_Main/ui/GhPanel.cs.meta
Normal file
@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 74fc782cb08ecb34c87baec0a6fdc912
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
@ -41,6 +41,6 @@ public class productListPackage
|
||||
public string Name { get; set; }
|
||||
public float Price { get; set; }
|
||||
public float Amount { get; set; }
|
||||
public int FirstStatus { get; set; }
|
||||
public int first_status { get; set; }
|
||||
//是否首冲翻倍 0:正常 1:翻倍
|
||||
}
|
Loading…
Reference in New Issue
Block a user