Commit 93f53a69 authored by LiLiuZhou's avatar LiLiuZhou

11

parent b76fb8ab
......@@ -513,6 +513,7 @@ GameObject:
- component: {fileID: 6808044341889333407}
- component: {fileID: 6808044341889333401}
- component: {fileID: 6808044341889333406}
- component: {fileID: 5315948635498579691}
m_Layer: 5
m_Name: MyMusic
m_TagString: Untagged
......@@ -576,6 +577,49 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &5315948635498579691
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6808044341889333404}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
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: 6808044341889333406}
m_OnClick:
m_PersistentCalls:
m_Calls: []
--- !u!1 &6808044342050861523
GameObject:
m_ObjectHideFlags: 0
......
......@@ -59,25 +59,7 @@ public class GameController : MonoBehaviour
}
/// <summary>
/// 获取歌曲列表
/// </summary>
public void GetSongsList(int song_id)
{
Dictionary<string, object> paras = new Dictionary<string, object>();
paras.Add("song_id", song_id);
HttpTool.Instance._Get("app/v1/watermelon/songs_list", paras, new Action<SongBean>((result) =>
{
}), new Action<string, string>((code, msg) =>
{
Debug.unityLogger.Log("获取歌曲列表 " + code + " msg " + msg);
}));
}
/// <summary>
/// 合成歌曲上报
/// </summary>
public void GetNoteCompleted(int song_id)
{
Dictionary<string, object> paras = new Dictionary<string, object>();
......
......@@ -33,7 +33,7 @@ public class HomeInfoControl : MonoBehaviour
UIMgr.Getinstance().ShowPanel<MainPanel>(E_Layer.mid);
UIMgr.Getinstance().ShowPanel<TouchPanel>(E_Layer.bot);
GameController.GetInstance().GetSongsList(0);
//GameController.GetInstance().GetSongsList(0);
GameController.GetInstance().GetWithdrawList(1);
}
......
......@@ -26,6 +26,7 @@ public class MainPanel : BasePanel
{
GetControl<Text>("CashNumTv").text = "¥" + result.available;
GetControl<Text>("FruitNumTv").text = result.count + "个";
GetControl<Button>("MyMusic").onClick.AddListener(() => { UIMgr.Getinstance().ShowPanel<MusicPanel>(E_Layer.lower_top); });
}), new Action<string, string>((code, msg) =>
{
Debug.unityLogger.Log("首页信息 " + code + " msg " + msg);
......
using System.Collections;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
......@@ -12,7 +13,25 @@ public class MusicPanel : BasePanel
public override void OnInit(object data = null)
{
//GetControl<Button>("btnBack").onClick.AddListener()
GetControl<Button>("btnBack").onClick.AddListener(() =>{ UIMgr.Getinstance().HidePanel<MusicPanel>(); });
#region 通过数据初始化面板
Dictionary<string, object> paras = new Dictionary<string, object>();
paras.Add("song_id", 1);
HttpTool.Instance._Get("app/v1/watermelon/songs_list", paras, new Action<SongBean>((result) =>
{
for (int i = 0; i < result.list.Count; i++)
{
GameObject obj = ResMgr.Getinstance().Load<GameObject>("Cells/MusicCell");
obj.transform.SetParent(GetControl<ScrollRect>("svMusic").content.transform);
}
}), new Action<string, string>((code, msg) =>
{
Debug.unityLogger.Log("获取歌曲列表 " + code + " msg " + msg);
}));
#endregion
}
public override void OnRefresh(object data = null)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment