public Dictionary <string, Object> GetListByCode(string dataSMemberID, string dataSHGUID, string dataZFGUID, string agentID, bool sbool)
 {
     try
     {
         Dictionary <string, Object> dic = new Dictionary <string, object>();
         dynamic result = CommonRequest.ApiAccountGet(agentID);
         if (result != null && result.AccoutInfo != null && result.AccoutInfo.PaymentType != null)
         {
             if (ChangePaymentType(result.AccoutInfo.PaymentType.ToString()))
             {
                 dic = GetPingTaiListByCode(dataSMemberID, dataSHGUID, dataZFGUID, agentID, sbool);
             }
             else
             {
                 dic = GetAgentListByCode(dataSMemberID, dataSHGUID, dataZFGUID, agentID, sbool);
             }
         }
         return(dic);
     }
     catch (Exception ex)
     {
         logger.Error("根据地区code获取配送方式列表接口异常:" + ex);
         return(null);
     }
 }
        public object Get(string loginid)
        {
            dynamic resultModel = CommonRequest.ApiAccountGet(loginid);

            if (resultModel != null)
            {
                return(resultModel.AccoutInfo);
            }
            return(null);
        }
        public HttpStatusCode GetUserAutoLogin(string loginid)
        {
            var user = CommonRequest.ApiAccountGet(loginid);

            if (user != null)
            {
                FormAuth(loginid);
                return(HttpStatusCode.OK);
            }
            else
            {
                return(HttpStatusCode.NotFound);
            }
        }
        public Dictionary <string, Object> Login(string MemLoginID, string AgentID, string Sbool)
        {
            try
            {
                logger.Info("进入微信登录");
                logger.Info("MemLoginID:" + MemLoginID);
                logger.Info("AgentID:" + AgentID);
                logger.Info("Sbool:" + Sbool);
                if (MemLoginID.Length == 3)
                {
                    new CookieHelper().Remove("wxOpenID");
                    new CookieHelper().Remove("AgentID");
                    SetAuthCookie("AgentID", AgentID);
                    SetAuthCookie("wxOpenID", MemLoginID);
                }
                var LoginId = CommonRequest.ApiCheckWXOpenIDIsBind(MemLoginID);
                if (LoginId != "")
                {
                    dynamic resultModel = CommonRequest.ApiAccountGet(LoginId);
                    if (resultModel != null)
                    {
                        Account myaccount = Newtonsoft.Json.JsonConvert.DeserializeObject <Account>(resultModel.AccoutInfo.ToString());
                        SetAuthCookie(myaccount);
                    }
                }
                else
                {
                    RemoveCookie();
                }

                return(CommonRequest.ApiWeiXinLogin("shopnum1_administrators"));
            }
            catch (Exception e)
            {
                logger.Error("\r\n---微信登录接口异常:" + e);
            }
            return(null);
        }