示例#1
0
        //@"http://mobile-api.laidiantech.com:8088";
        public static void GetAuthCode(string mobile)
        {
            string Url = Server + @"/cdt/authCodeGet?mobile=" + mobile;

            Dictionary <string, string> param = new Dictionary <string, string>();
            WCDMA wcdma = new WCDMA();

            string strJoin = wcdma.GetRequest(Url, param);

            if (strJoin != "")
            {
            }
        }
示例#2
0
        public static int Login(string user, string pwd)
        {
            try
            {
                //如果有任务
                string Url = Server + @"/cdt/adminLogin?mobile=" + user + "&authCode=" + pwd;

                Dictionary <string, string> param = new Dictionary <string, string>();
                WCDMA wcdma = new WCDMA();

                string strJoin = wcdma.GetRequest(Url, param);

                if (strJoin != "")
                {
                    try
                    {
                        // ClS.Admin respdata = JsonMapper.ToObject<ClS.Admin>(strJoin);
                        if (strJoin.Contains("\"result\":1"))
                        {
                            //if (strJoin.Contains("\"userType\":1"))
                            //{
                            return(1);
                            //}
                            //else if(strJoin.Contains("\"userType\":2"))
                            //{
                            //    return 2;
                            //}
                            //else
                            //{
                            //    return 0;
                            //}
                        }
                        return(0);
                    }
                    catch
                    {
                        return(0);
                    }
                }
                else
                {
                    return(0);
                }
            }
            catch
            {
                return(0);
            }
        }