コード例 #1
0
        public IActionResult updateRoleArticle([FromBody] JObject value)
        {
            Dictionary <string, object> d = value.ToObject <Dictionary <string, object> >();
            Dictionary <string, object> r = new Dictionary <string, object>();

            try
            {
                string b = mm.updateRoleArticle(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));
        }