Authored by 张帅

页面优化

@@ -907,6 +907,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService{ @@ -907,6 +907,10 @@ public class GrassArticleServiceImpl implements IGrassArticleService{
907 rspBo.setAuthStatus(grassArticle.getAuthStatus()); 907 rspBo.setAuthStatus(grassArticle.getAuthStatus());
908 rspBo.setSource(grassArticle.getArticleType()); 908 rspBo.setSource(grassArticle.getArticleType());
909 rspBo.setSourceStr(ArticleTypeEnum.getNameByValue(grassArticle.getArticleType())); 909 rspBo.setSourceStr(ArticleTypeEnum.getNameByValue(grassArticle.getArticleType()));
  910 +
  911 + //是否已发布 Y 已经发布 N 还没发布 //只有authtime =1 的时候 字段才有效
  912 + String isPublished = grassArticle.getCreateTime() >= System.currentTimeMillis() ? "N" : "Y";
  913 + rspBo.setPublishTime(isPublished);
910 //1)文章内容 914 //1)文章内容
911 List<GrassArticleBlock> grassArticleContentList = grassArticleBlockDao.selectByArticleId(articleId); 915 List<GrassArticleBlock> grassArticleContentList = grassArticleBlockDao.selectByArticleId(articleId);
912 List<String> imageList = new ArrayList<>(); 916 List<String> imageList = new ArrayList<>();
@@ -202,9 +202,11 @@ @@ -202,9 +202,11 @@
202 if (authStatus == null || authStatus == '0') { 202 if (authStatus == null || authStatus == '0') {
203 authStatusStr = "待审核"; 203 authStatusStr = "待审核";
204 // $("#authBtn").attr("style", "display:block"); 204 // $("#authBtn").attr("style", "display:block");
205 - } else if (authStatus == '1') { 205 + } else if (authStatus == '1' ) {
206 authStatusStr = "已通过"; 206 authStatusStr = "已通过";
207 - $("#cancelBtn").attr("style", "display:block"); 207 + if(detailInfo.publishTime == 'N'){
  208 + $("#cancelBtn").attr("style", "display:block");
  209 + }
208 } else if (authStatus == '2') { 210 } else if (authStatus == '2') {
209 authStatusStr = "未通过"; 211 authStatusStr = "未通过";
210 // $("#authBtn").attr("style", "display:block"); 212 // $("#authBtn").attr("style", "display:block");
@@ -293,7 +295,7 @@ @@ -293,7 +295,7 @@
293 alert(data.message); 295 alert(data.message);
294 }else{ 296 }else{
295 $.messager.alert("操作成功", "操作成功", "info"); 297 $.messager.alert("操作成功", "操作成功", "info");
296 - location = contextPath+"/html/grass/article/draftArticleList.html"; 298 + location .reload();
297 } 299 }
298 }, "json"); 300 }, "json");
299 } 301 }
@@ -306,7 +308,7 @@ @@ -306,7 +308,7 @@
306 alert(data.message); 308 alert(data.message);
307 }else{ 309 }else{
308 $.messager.alert("操作成功", "发布成功", "info"); 310 $.messager.alert("操作成功", "发布成功", "info");
309 - location = contextPath+"/html/grass/article/draftArticleList.html"; 311 + location .reload();
310 } 312 }
311 }, "json"); 313 }, "json");
312 } 314 }