示例#1
0
文件: HyApp.cs 项目: wjszxli/xdjb
    public string BindTelSaveInfo(string pis_yzm, string pis_tel, string pis_name, string pis_code)
    {
        string pos_json = "";
        string ls_yzm = ConfigurationManager.AppSettings["Yanzm"].ToString();
        if (pis_tel != "" && pis_name != "" && pis_code != "" && pis_yzm == ls_yzm)
        {
            try
            {
                TPortalClass.JpVerifyCode JpVerifyCode = new TPortalClass.JpVerifyCode();
                DataTable dt = JpVerifyCode.GetCodesByTel(pis_tel);
                if (dt.Rows.Count > 0)
                {
                    if (pis_code == dt.Rows[0]["hy_code"].ToString())
                    {
                        TPortalClass.JpUserVip JpUserVip = new TPortalClass.JpUserVip();

                        JpUserVip.UpdateTel(pis_tel, pis_name);
                        //绑定成功
                        pos_json = "{\"code\":\"0\"}";
                    }
                    else
                    {
                        //验证码错误
                        pos_json = "{\"code\":\"1\"}";
                    }
                }
            }
            catch
            {
                //系统错误
                pos_json = "{\"code\":\"2\"}";
            }
            finally
            {
            }
        }
        else
        {
            //非法调用
            pos_json = "{\"code\":\"3\"}";
        }
        return pos_json;
    }