/// <summary>
        /// 修改密码
        /// </summary>
        /// <param name="token"></param>
        /// <param name="state"></param>
        /// <param name="callbackId"></param>
        /// <param name="data"></param>
        public static void RetrievePassword(string token, int state, string callbackId, byte[] data)
        {
            if (state == 107)
            {
                ClassStatic.Result resultData = new ClassStatic.Result("false");

                // 验证是否发送验证码
                if (ClassStatic.clientList.ContainsKey(token) && ClassStatic.clientList[token].verifies != "")
                {
                    ClassStatic.Client client = ClassStatic.clientList[token];

                    ClassStatic.ClientData clientData = ClassStatic.GetClientData(data);

                    if (ClassStatic.IsComplexPass(clientData.str2))
                    {
                        // 验证码错误
                        if (DateTime.Compare(client.effective, DateTime.Now) > 0 && clientData.str3 == client.verifies && client.phone == clientData.str1)
                        {
                            System.Data.DataTable dataTable = ClassStatic.sqlServer.Field("*").Where("phone='" + clientData.str1 + "'").Select("userInfo");
                            if (dataTable.Rows.Count > 0)
                            {
                                Dictionary <string, string> dataSql = new Dictionary <string, string>();
                                dataSql.Add("phone", clientData.str1);
                                dataSql.Add("password", ClassStatic.Md5(clientData.str2));

                                if (ClassStatic.sqlServer.Where("phone='" + clientData.str1 + "'").Update("userInfo", dataSql) > 0)
                                {
                                    resultData.ret = "true";
                                    resultData.msg = "密码修改成功";
                                }
                                else
                                {
                                    resultData.msg = "密码修改失败";
                                }
                            }
                            else
                            {
                                resultData.msg = "此手机号未注册";
                            }
                        }
                        else
                        {
                            resultData.msg = "验证码错误";
                        }
                    }
                    else
                    {
                        resultData.msg = "请输入复杂密码再注册";
                    }
                }
                else
                {
                    resultData.msg = "请先发送验证码";
                }

                // 向客户端返回处理结果
                ClassStatic.tcpServer.Send(token, state, callbackId, ClassStatic.SetResultByte(resultData));
            }
        }
        /// <summary>
        /// 用户登录
        /// </summary>
        public static void Login(string token, int state, string callbackId, byte[] data)
        {
            if (state == 101)
            {
                ClassStatic.Result     resultData = new ClassStatic.Result("false");
                ClassStatic.ClientData clientData = ClassStatic.GetClientData(data);

                if (ClassStatic.IsPhone(clientData.str1))
                {
                    if (ClassStatic.IsComplexPass(clientData.str2))
                    {
                        System.Data.DataTable dataTable = ClassStatic.sqlServer.Field("*").Where("phone='" + clientData.str1 + "' and password='******'").Select("userInfo");
                        if (dataTable.Rows.Count > 0)
                        {
                            ClassStatic.Client client = new ClassStatic.Client();
                            client.login = true;
                            client.state = 0;
                            client.phone = clientData.str1;
                            client.uid   = Convert.ToInt32(dataTable.Rows[0][0]);
                            client.bind  = dataTable.Rows[0][3].ToString();
                            if (ClassStatic.clientList.ContainsKey(token))
                            {
                                ClassStatic.clientList[token] = client;
                            }
                            else
                            {
                                ClassStatic.clientList.Add(token, client);
                            }
                            resultData.ret = "true";
                            resultData.msg = "登录成功!";
                        }
                        else
                        {
                            resultData.msg = "账号或密码错误!";
                        }
                    }
                    else
                    {
                        resultData.msg = "请输入合法的密码!";
                    }
                }
                else
                {
                    resultData.msg = "请输入正确的用户名!";
                }
                // 向客户端返回处理结果
                ClassStatic.tcpServer.Send(token, state, callbackId, ClassStatic.SetResultByte(resultData));
            }
        }