Authored by liangyi.chen@yoho.cn

页面bug修复

@@ -58,6 +58,8 @@ @@ -58,6 +58,8 @@
58 <div region="center" id="labelGroupList" style="margin-left: 20px;width: 100%"> 58 <div region="center" id="labelGroupList" style="margin-left: 20px;width: 100%">
59 <div id="tt" class="easyui-layout" style="overflow-y: scroll;overflow-x: auto;"> 59 <div id="tt" class="easyui-layout" style="overflow-y: scroll;overflow-x: auto;">
60 <form name="publishArticleForm" id="publishArticleForm" method="post" > 60 <form name="publishArticleForm" id="publishArticleForm" method="post" >
  61 + <input type="hidden" name="crawlerId" id="crawlerId" />
  62 + <input type="hidden" name="sort" id="sort" />
61 <div style="margin-top: 20px;margin-left: 30px"> 63 <div style="margin-top: 20px;margin-left: 30px">
62 <table border="0" style="width:95%;margin-top:5px;line-height:30px;" id="tab"> 64 <table border="0" style="width:95%;margin-top:5px;line-height:30px;" id="tab">
63 65
@@ -178,7 +180,7 @@ @@ -178,7 +180,7 @@
178 var imgList ; 180 var imgList ;
179 var contentText; 181 var contentText;
180 var articleUid ; 182 var articleUid ;
181 - var id; 183 + var crawlerId;
182 $(function () { 184 $(function () {
183 185
184 $("#content").emojioneArea({ 186 $("#content").emojioneArea({
@@ -662,7 +664,16 @@ @@ -662,7 +664,16 @@
662 theRequest[ strs[ i ].split( "=" )[ 0 ] ] = ( strs[ i ].split( "=" )[ 1 ] ); 664 theRequest[ strs[ i ].split( "=" )[ 0 ] ] = ( strs[ i ].split( "=" )[ 1 ] );
663 } 665 }
664 articleUid = theRequest.yhUid; 666 articleUid = theRequest.yhUid;
665 - id= theRequest.id; 667 + crawlerId= theRequest.id;
  668 + var sort;
  669 + debugger;
  670 + if(theRequest.crawlerType == 1){
  671 + sort = 2;
  672 + }else if(theRequest.crawlerType == 2){
  673 + sort = 1;
  674 + }
  675 + $("#crawlerId").val(crawlerId);
  676 + $("#sort").val(sort);
666 } 677 }
667 if (articleUid != null && articleUid != undefined) 678 if (articleUid != null && articleUid != undefined)
668 { 679 {
@@ -671,7 +682,7 @@ @@ -671,7 +682,7 @@
671 $.ajax({ 682 $.ajax({
672 async: false, 683 async: false,
673 type: "GET", 684 type: "GET",
674 - url: serverContextPath + "/tblCrawlerArticle/queryTblCrawlerInfoById?id="+id, //提交到后端的url 685 + url: serverContextPath + "/tblCrawlerArticle/queryTblCrawlerInfoById?id="+crawlerId, //提交到后端的url
675 success: function (result) { 686 success: function (result) {
676 if(result.code == 200) { 687 if(result.code == 200) {
677 if(result.data !=null && result.data !='') { 688 if(result.data !=null && result.data !='') {
@@ -209,7 +209,7 @@ @@ -209,7 +209,7 @@
209 209
210 if(value == '' || value == null || value == undefined){ 210 if(value == '' || value == null || value == undefined){
211 if(rowData.crawlerType == 2){ 211 if(rowData.crawlerType == 2){
212 - str = "短文章"; 212 + str = "笔记";
213 }else if(rowData.crawlerType == 1){ 213 }else if(rowData.crawlerType == 1){
214 str = "长文章" 214 str = "长文章"
215 } 215 }
@@ -294,8 +294,14 @@ @@ -294,8 +294,14 @@
294 }else if(rowData.checkStatus == 2){ 294 }else if(rowData.checkStatus == 2){
295 str += "<a role='updateStatus' class='btn-success' dataId='"+rowData.id+ "' dataAuthStatus='1' index='"+ rowIndex + "' style='margin-left:10px'>设为未审核</a>"; 295 str += "<a role='updateStatus' class='btn-success' dataId='"+rowData.id+ "' dataAuthStatus='1' index='"+ rowIndex + "' style='margin-left:10px'>设为未审核</a>";
296 } 296 }
297 - if(rowData.articleId != ''){  
298 - str = str + "<a role='showDetail' dataId='"+rowData.id+ "' index='"+ rowIndex + "' style='margin-left:10px'>编辑</a>"; 297 + if(rowData.articleId == '' || rowData.articleId == null){
  298 + if(rowData.checkStatus == 2){
  299 + str = str + "<a role='showDetail' dataId='"+rowData.id+ "' index='"+ rowIndex + "' style='margin-left:10px;'>编辑</a>";
  300 + }else{
  301 + str = str + "<a role='showDetail' dataId='"+rowData.id+ "' index='"+ rowIndex + "' style='margin-left:10px;display: none'>编辑</a>"
  302 + }
  303 + }else{
  304 + str = str + "<a role='showDetail' dataId='"+rowData.id+ "' index='"+ rowIndex + "' style='margin-left:10px;display: none'>编辑</a>"
299 } 305 }
300 return str; 306 return str;
301 } 307 }
@@ -349,7 +355,8 @@ @@ -349,7 +355,8 @@
349 var row = $("#activityListTable").datagrid('getData').rows[index]; 355 var row = $("#activityListTable").datagrid('getData').rows[index];
350 var yhUid = row.yhUid; 356 var yhUid = row.yhUid;
351 var imgList = row.imgList; 357 var imgList = row.imgList;
352 - getPublishDialog(yhUid , row.id , imgList); 358 + var crawlerType = row.crawlerType;
  359 + getPublishDialog(yhUid , row.id , imgList , crawlerType);
353 } 360 }
354 }); 361 });
355 362
@@ -358,7 +365,7 @@ @@ -358,7 +365,7 @@
358 365
359 366
360 function switchRecommend(id, status) { 367 function switchRecommend(id, status) {
361 - $.post(serverContextPath + "/tblCrawlerArticle/modifyStatus?id=" + id + "&checkStatus=" + status, function (data) { 368 + $.post(serverContextPath + "/tblCrawlerArticle/modifyTblCrawlerArticleStatus?id=" + id + "&checkStatus=" + status, function (data) {
362 if(data.code != 200){ 369 if(data.code != 200){
363 alert(data.message); 370 alert(data.message);
364 }else{ 371 }else{
@@ -369,12 +376,12 @@ @@ -369,12 +376,12 @@
369 }); 376 });
370 377
371 // 审核 文章详情页 378 // 审核 文章详情页
372 - function getPublishDialog(yhUid , id){ 379 + function getPublishDialog(yhUid , id , imgList , crawlerType){
373 if(yhUid == undefined){ 380 if(yhUid == undefined){
374 yhUid = ""; 381 yhUid = "";
375 } 382 }
376 window.location.href=contextPath + "/html/grass/tblCrawlerInfoManage/crawlerInfoPublish.html?yhUid="+yhUid+"&id=" 383 window.location.href=contextPath + "/html/grass/tblCrawlerInfoManage/crawlerInfoPublish.html?yhUid="+yhUid+"&id="
377 - +id; 384 + +id+"&crawlerType="+crawlerType;
378 } 385 }
379 386
380 387