Example #1
0
    public void OnGetApplyClubCallBack(ClientResponse response)
    {
        ClubAccountVO vo = JsonMapper.ToObject <ClubAccountVO>(response.message);

        if (vo.msgcode != 0)
        {
            TipsManagerScript.getInstance().setTips(vo.msgstring);
        }
        else
        {
            isagreePanelShow = true;
            agreeListPanel.SetActive(true);
            PrefabUtils.ClearChild(agreeListGrid);
            foreach (ClubAccount ac in vo.listaccount)
            {
                GameObject     child = PrefabUtils.AddChild(agreeListGrid, agreesub);
                agreeSubScript cs    = child.GetComponent <agreeSubScript>();
                cs.setValue(ac);
                cs.agreebtn.onClick.AddListener(() =>
                {
                    ClientRequest cr  = new ClientRequest();
                    cr.headCode       = APIS.AGREE_CLUB_REQUEST;
                    cr.messageContent = "{'agree':1,'uuid':" + ac.uuid + "}";
                    CustomSocket.getInstance().sendMsg(cr);
                });
                cs.nobtn.onClick.AddListener(() =>
                {
                    ClientRequest cr  = new ClientRequest();
                    cr.headCode       = APIS.AGREE_CLUB_REQUEST;
                    cr.messageContent = "{'agree':0,'uuid':" + ac.uuid + "}";
                    CustomSocket.getInstance().sendMsg(cr);
                });
            }
        }
    }
Example #2
0
    public void OnGetAllClubCallBack(ClientResponse response)
    {
        ClubAccountVO vo = JsonMapper.ToObject <ClubAccountVO>(response.message);

        if (vo.msgcode != 0)
        {
            TipsManagerScript.getInstance().setTips(vo.msgstring);
        }
        else
        {
            ismerberlistshow = true;
            menberListobj.SetActive(true);
            PrefabUtils.ClearChild(menberListGrid);
            foreach (ClubAccount ac in vo.listaccount)
            {
                GameObject      child = PrefabUtils.AddChild(menberListGrid, merbersub);
                merberSubScript cs    = child.GetComponent <merberSubScript>();
                cs.setValue(ac);
            }
        }
    }