Beispiel #1
0
        public IActionResult createRoleArticle([FromBody] JObject value)
        {
            Dictionary <string, object> d = value.ToObject <Dictionary <string, object> >();
            Dictionary <string, object> r = new Dictionary <string, object>();

            try
            {
                string b = mm.createRoleArticle(d);
                if (b == "")
                {
                    r["message"] = "成功";
                    r["code"]    = 2000;
                }
                else
                {
                    r["code"]    = -1;
                    r["message"] = b;
                }
            }
            catch (Exception e)
            {
                r["code"]    = -1;
                r["message"] = e.Message;
            }
            return(Json(r));
        }