Authored by 张帅

接口增校验

... ... @@ -306,7 +306,7 @@
function switchTimer(id, status,publishTime) {
debugger
var operateType = status == 1 ? 3 : 4;
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + id + "&publishTime=" + publishTime+ "&operateType="+ operateType, function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + id + "&publishTime=" + publishTime+ "&operateType="+ operateType, function (data) {
if(data.code != 200){
alert(data.message);
}else{
... ... @@ -319,7 +319,7 @@
function publishArticle(id) {
debugger
var operateType = 5;
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + id + "&operateType="+ operateType, function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + id + "&operateType="+ operateType, function (data) {
if(data.code != 200){
alert(data.message);
}else{
... ...
... ... @@ -456,7 +456,7 @@
function publishArticle(id) {
debugger
var operateType = 5;
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + id + "&operateType="+ operateType, function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + id + "&operateType="+ operateType, function (data) {
if(data.code != 200){
alert(data.message);
}else{
... ... @@ -468,7 +468,7 @@
function switchTimer(id, status,publishTime) {
debugger
var operateType = status == 1 ? 3 : 4;
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + id + "&publishTime=" + publishTime+ "&operateType="+ operateType, function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + id + "&publishTime=" + publishTime+ "&operateType="+ operateType, function (data) {
if(data.code != 200){
alert(data.message);
}else{
... ...
... ... @@ -497,7 +497,7 @@
iconCls: "icon-cancel",
handler: function () {
//文章审核-通过
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + articleId + "&authStatus=1&operateType=2", function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + articleId + "&authStatus=1&operateType=2", function (data) {
if (data.code == 200) {
$.messager.show({
title: "提示",
... ... @@ -522,7 +522,7 @@
handler: function () {
//文章审核--不通过
//文章审核-通过
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + articleId + "&authStatus=2&operateType=2", function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + articleId + "&authStatus=2&operateType=2", function (data) {
if (data.code == 200) {
$.messager.show({
title: "提示",
... ... @@ -553,7 +553,7 @@
//审核通过 或者不通过
function switchRecommend(id, status) {
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + id + "&authStatus=" + status + "&operateType=2", function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + id + "&authStatus=" + status + "&operateType=2", function (data) {
if(data.code != 200){
alert(data.message);
}else{
... ...
... ... @@ -342,7 +342,7 @@
}
$.messager.confirm("确认", "确认这篇文章" + message + "吗?", function (flag) {
if (flag) {
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + articleId + "&authStatus=" + status + "&operateType=2", function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + articleId + "&authStatus=" + status + "&operateType=2", function (data) {
if (data.code != 200) {
alert("操作失败,稍后重试");
//刷新当前页面
... ...
... ... @@ -578,7 +578,7 @@
onClick: function () {
var dataId = $(this).attr("dataId");
var authStatus = $(this).attr("dataAuthStatus");//取消屏蔽则恢复为审核通过状态
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + dataId+"&authStatus="+authStatus+"&operateType=2", function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + dataId+"&authStatus="+authStatus+"&operateType=2", function (data) {
if(data.code != 200){
alert(data.message);
}else{
... ... @@ -594,7 +594,7 @@
function switchRecommend(id, status) {
debugger
var switchStatus = status == 1 ? 0 : 1;
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + id + "&isRecommend=" + switchStatus+ "&operateType=0", function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + id + "&isRecommend=" + switchStatus+ "&operateType=0", function (data) {
if(data.code != 200){
alert(data.message);
}else{
... ... @@ -606,7 +606,7 @@
function switchTop(id, status) {
debugger
var switchStatus = status == 1 ? 0 : 1;
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + id + "&isTop=" + switchStatus+ "&operateType=0", function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + id + "&isTop=" + switchStatus+ "&operateType=0", function (data) {
if(data.code != 200){
alert(data.message);
}else{
... ... @@ -636,7 +636,7 @@
iconCls: "icon-cancel",
handler: function () {
//文章审核-通过
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + articleId + "&authStatus=1&operateType=2", function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + articleId + "&authStatus=1&operateType=2", function (data) {
if (data.code == 200) {
$.messager.show({
title: "提示",
... ... @@ -661,7 +661,7 @@
handler: function () {
//文章审核--不通过
//文章审核-通过
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + articleId + "&authStatus=2&operateType=2", function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + articleId + "&authStatus=2&operateType=2", function (data) {
if (data.code == 200) {
$.messager.show({
title: "提示",
... ...
... ... @@ -268,7 +268,7 @@
function switchTimer(id, status,publishTime) {
debugger
var operateType = status == 1 ? 3 : 4;
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + id + "&publishTime=" + publishTime+ "&operateType="+ operateType, function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + id + "&publishTime=" + publishTime+ "&operateType="+ operateType, function (data) {
if(data.code != 200){
alert(data.message);
}else{
... ... @@ -281,7 +281,7 @@
function publishArticle(id) {
debugger
var operateType = 5;
$.post(serverContextPath + "/grassArticle/updateArticle?articleId=" + id + "&operateType="+ operateType, function (data) {
$.post(serverContextPath + "/grassArticle/updateArticle.do?articleId=" + id + "&operateType="+ operateType, function (data) {
if(data.code != 200){
alert(data.message);
}else{
... ...