Пример #1
0
 public void relogin()
 {
     relogined     = true;
     relogin_again = false;
     if (Globle.DebugMode == 2)
     {
         NetClient.instance.reConnect();
         // this.g_mgr.g_netM.reConnect();
     }
     else
     {
         HttpAppMgr.POSTSvr(Globle.curServerD.login_url, "", _getPlyInfoBack, true, "GET");
         //解决手机上断线重连的问题
         DelayDoManager.singleton.AddDelayDo(() =>
         {
             if (relogin_again == false)
             {
                 if (disconect.instance != null)
                 {
                     disconect.instance.setErrorType(disconect.ERROR_TYPE_NETWORK);
                 }
             }
         }, 3);
     }
 }
Пример #2
0
 public void GetPlyInfo(int sid)
 {
     os.sys.loscalStorage.writeInt("sever_id", sid);
     for (int i = 0; i < this._srv_lists.Count; i++)
     {
         bool flag = this._srv_lists[i]["sid"]._int == sid;
         if (flag)
         {
             HttpAppMgr.POSTSvr(this._srv_lists[i]["login_url"]._str, "", new Action <Variant>(this._getPlyInfoBack), true, "GET");
             break;
         }
     }
 }
Пример #3
0
        //public void onSdkCallBack(Variant v)
        //{
        //    DebugTrace.print("onSdkCallBack:");
        //    DebugTrace.dumpObj(v);
        //    string cmd = v["cmd"]._str;
        //    if (AndroidSDKManager.SDKType.login.ToString() == cmd)
        //    {
        //        //_platId= "";
        //        onSelectPlatuid(v);
        //    }
        //    else
        //    {

        //    }
        //}

        private void onSelectPlatuid(Variant v)
        {
            if (!v.ContainsKey("data") || !v["data"].ContainsKey("pid") || !v["data"].ContainsKey("avatar") || !v["data"].ContainsKey("uid"))
            {
                DebugTrace.print("Erorr: Variant no`t Find <data>");
                DebugTrace.dumpObj(v);
                return;
            }

            string str1 = "platform=" + v["data"]["pid"]._str + "&sign=" + v["data"]["avatar"]._str + "&platuid=" + v["data"]["uid"]._str;

            //  str1 = "platform=qihooandroid&sign=7d065c0b871a4f280404070bc1aaa125|1439812387" + "&platuid=" + "2534758785";
            HttpAppMgr.POSTSvr(_query, str1, _getSeverListBack);
        }
Пример #4
0
        public void relogin()
        {
            LGPlatInfo.relogined = true;
            bool flag = Globle.DebugMode == 2;

            if (flag)
            {
                NetClient.instance.reConnect(null);
            }
            else
            {
                HttpAppMgr.POSTSvr(Globle.curServerD.login_url, "", new Action <Variant>(this._getPlyInfoBack), true, "GET");
            }
        }
Пример #5
0
 //public function test():void
 //{
 //    notify( {key:"test"} );
 //}
 public void GetPlyInfo(int sid)
 {
     os.sys.loscalStorage.writeInt("sever_id", sid);
     for (int i = 0; i < _srv_lists.Count; i++)
     {
         if (_srv_lists[i]["sid"]._int == sid)
         {
             //string requrl = _srv_lists[i]["login_url"]._str;
             //string[] strs = requrl.Split('?');
             //POSTSvr( strs[0], strs[1], _getPlyInfoBack );
             HttpAppMgr.POSTSvr(_srv_lists[i]["login_url"]._str, "", _getPlyInfoBack, true, "GET");
             break;
         }
     }
 }
Пример #6
0
        public void loadServerList()
        {
            bool flag = Globle.QSMY_Platform_Index == ENUM_QSMY_PLATFORM.QSPF_None;

            if (!flag)
            {
                HttpAppMgr.POSTSvr(Globle.YR_srvlists__slurl, string.Concat(new string[]
                {
                    "platform=",
                    Globle.YR_srvlists__platform,
                    "&sign=",
                    Globle.YR_srvlists__sign,
                    "&platuid=",
                    Globle.YR_srvlists__platuid
                }), new Action <Variant>(this._getSeverListBack), true, "POST");
                debug.Log("sl_url = " + Globle.YR_srvlists__slurl);
            }
        }
Пример #7
0
        //public void logSDKCustomAP(string id)
        //{
        //    //新的埋点策略
        //    string event_name = "qsmy_" + id;
        //    string gatajsonString = "{\"portname\":\"setEvent\",\"identifier\":\"" + event_name + "\"}";
        //    AnyPlotformSDK.Call_Cmd("gataroleplatform", "lanGaiya", gatajsonString);
        //}

        ////设置SDK的埋点
        //public void logSDKAP(string pname)
        //{
        //    //在埋点中更新相关的角色信息
        //    //string exitRoleInfoJsonString = "{\"roleId\":\"1\",\"roleName\":\"chasname\",\"roleLevel\":\"101\",\"roleGold\":\"300\",\"roleYb\":\"200\",\"roleServerId\":\"1\",\"roleServerName\":\"servername\"}";
        //    //AnyPlotformSDK.Add_moreCmdInfo("lanRole", exitRoleInfoJsonString);

        //    try
        //    {
        //        Variant v = new Variant();
        //        v["roleId"] = PlayerModel.getInstance().cid;
        //        v["roleName"] = PlayerModel.getInstance().name;
        //        v["roleLevel"] = PlayerModel.getInstance().lvl;
        //        v["roleGold"] = PlayerModel.getInstance().money;
        //        v["roleYb"] = PlayerModel.getInstance().gold;
        //        v["roleServerId"] = Globle.curServerD.sid;
        //        v["roleServerName"] = Globle.curServerD.server_name;
        //        string exitRoleInfoJsonString = JsonManager.VariantToString(v);
        //        AnyPlotformSDK.Add_moreCmdInfo("lanRole", exitRoleInfoJsonString);

        //        string gatajsonString = "{\"portname\":\"" + pname + "\"}";
        //        //string gatajsonString = "{\"portname\":\"" + pname + "\",\"identifier\":\"create-role-begin\"}";
        //        AnyPlotformSDK.Call_Cmd("gataroleplatform", "lanGaiya", gatajsonString);
        //    }
        //    catch (System.Exception e)
        //    {
        //        Debug.LogWarning(pname);
        //    }
        //}

        ////获取埋点的返回
        //private void _getLogAPBack(Variant data)
        //{
        //    debug.Log("http = " + data.dump());
        //}
        public void loadServerList()
        {
            //AndroidSDKManager.actFlag = true;
            //DebugTrace.print("============= test act ===================");

            if (Globle.QSMY_Platform_Index == ENUM_QSMY_PLATFORM.QSPF_None)
            {
                //内网服务器的列表地址
                //  HttpAppMgr.POSTSvr("http://10.1.8.76/ifacec/sdk_srvlists.php", "platform=" + Globle.YR_srvlists__platform + "&sign=&platuid=" + Globle.YR_srvlists__platuid, _getSeverListBack);
            }
            else
            {
                //外网平台的列表地址
                // POSTSvr("http://qsmy-mobile.8090mt.com/qsmy_mobile/ifacec/sdk_srvlists.php", "platform=" + Globle.YR_srvlists__platform + "&sign=&platuid=" + Globle.YR_srvlists__platuid, _getSeverListBack);

                //HttpAppMgr.POSTSvr("http://123.59.51.193/ifacec/sdk_srvlists.php", "platform=" + Globle.YR_srvlists__platform + "&sign=" + Globle.YR_srvlists__sign + "&platuid=" + Globle.YR_srvlists__platuid, _getSeverListBack);
                //debug.Log("http://123.59.51.193/ifacec/sdk_srvlists.php?platform=" + Globle.YR_srvlists__platform + "&sign=" + Globle.YR_srvlists__sign + "&platuid=" + Globle.YR_srvlists__platuid);

                HttpAppMgr.POSTSvr(Globle.YR_srvlists__slurl, "platform=" + Globle.YR_srvlists__platform + "&sign=" + Globle.YR_srvlists__sign + "&platuid=" + Globle.YR_srvlists__platuid + "&ver=1.0.1", _getSeverListBack);
                debug.Log("sl_url = " + Globle.YR_srvlists__slurl);
                //debug.Log(Globle.YR_srvlists__slurl + Globle.YR_srvlists__platform + "&sign=" + Globle.YR_srvlists__sign + "&platuid=" + Globle.YR_srvlists__platuid);
            }
        }
Пример #8
0
        private void onSelectPlatuid(Variant v)
        {
            bool flag = !v.ContainsKey("data") || !v["data"].ContainsKey("pid") || !v["data"].ContainsKey("avatar") || !v["data"].ContainsKey("uid");

            if (flag)
            {
                DebugTrace.print("Erorr: Variant no`t Find <data>");
                DebugTrace.dumpObj(v);
            }
            else
            {
                string param = string.Concat(new string[]
                {
                    "platform=",
                    v["data"]["pid"]._str,
                    "&sign=",
                    v["data"]["avatar"]._str,
                    "&platuid=",
                    v["data"]["uid"]._str
                });
                HttpAppMgr.POSTSvr(this._query, param, new Action <Variant>(this._getSeverListBack), true, "POST");
            }
        }
Пример #9
0
 public void sendLogin(string login_url)
 {
     HttpAppMgr.POSTSvr(login_url, "", _getPlyInfoBack, true, "GET");
 }
Пример #10
0
 public void sendLogin(string login_url)
 {
     HttpAppMgr.POSTSvr(login_url, "", new Action <Variant>(this._getPlyInfoBack), true, "GET");
 }