public string UpdatePraise(string pis_yzm, string pis_table, string pis_id) { string pos_json = ""; string configYzm = ConfigurationManager.AppSettings["Yanzm"].ToString(); bool flag = false; if (configYzm == pis_yzm && pis_table != "" && pis_id != "") { if (pis_table == "0") { JpArticle JpArticle = new JpArticle(); flag = JpArticle.updatePraiseCount(Convert.ToInt32(pis_id)); } else if (pis_table == "1") { JpPhotography JpPhotography = new JpPhotography(); flag = JpPhotography.updatePraiseCount(Convert.ToInt32(pis_id)); } if (flag) { //点赞成功 pos_json = "{\"code\":\"0\"}"; } else { //系统错误 pos_json = "{\"code\":\"1\"}"; } } else { //非法调用 pos_json = "{\"code\":\"2\"}"; } return pos_json; }