示例#1
0
        /// <summary>
        /// 登录中
        /// </summary>
        /// <param name="obj"></param>
        private void IsLogining(object obj)
        {
            IsLoginingEvent?.Invoke(true);//触发登录成功前事件

            #region 拉取个人信息
            var mine = HttpService.GetMine();//个人信息
            if (mine != null && mine.Success && mine.data != null)
            {
                LoginData = mine.data;
                if (cookies != null && LoginInfo != null && LoginData.currentCompany != null)
                {
                    //USeManager.Instance.Stop();
                    string clientid = LoginData.currentCompany.id + "_pc";
                    USeManager.Instance.Start(clientid, LoginInfo.username, HttpUtility.UrlEncode(cookies));
                }
            }
            #endregion

            #region 拉取合约行情列表 重新初始化
            InitializationData();
            #endregion

            #region 拉取黑白名单
            GetWhiteAndBlack();
            #endregion

            #region 拉取全部的等级和品牌信息
            var LevelBrand = HttpService.GetBaseLevelBrandInfo();
            if (LevelBrand != null && LevelBrand.Result != null)
            {
                LevelBrandDy.Clear();
                foreach (var v in LevelBrand.Result)
                {
                    if (!LevelBrandDy.ContainsKey(v.id))
                    {
                        LevelBrandDy.Add(v.id, v);
                    }
                    else
                    {
                        LevelBrandDy[v.id] = v;
                    }
                }
            }
            #endregion

            #region 拉取成交列表
            var Tradedlisting = HttpService.GetTradedlisting();
            if (Tradedlisting != null && Tradedlisting.data != null)
            {
                TradedList = Tradedlisting.data;
            }
            #endregion

            isLogin = true;
            IsLoginEvent?.Invoke(true);//触发登录成功事件
        }