Exemple #1
0
        public DataTable VerificationCodeValid([FromBody] CodeInfo json)
        {
            DataTable dt = null;

            try
            {
                if (!string.IsNullOrWhiteSpace(json.phone) && !string.IsNullOrWhiteSpace(json.code) && json.codetype > 0)
                {
                    OperationData od    = new OperationData();
                    ValidInfo     valid = od.VerificationCodeValid(json);
                    dt = GetTable(valid.valid, valid.errmsg);
                }
                else
                {
                    dt = GetTable("false", "参数错误");
                }
            }
            catch (Exception ex)
            {
                dt = GetTable("false", ex.Message);
                Log.WriteError(ex, "验证码验证是否正确(VerificationCodeValid)");
            }
            return(dt);
        }