Selaa lähdekoodia

Merge branch 'master' into feature/v4.7.23

lianbingjie 2 vuotta sitten
vanhempi
commit
4dc035e380
1 muutettua tiedostoa jossa 141 lisäystä ja 159 poistoa
  1. 141 159
      src/web/staticres/public-pc/js/article-content.js

+ 141 - 159
src/web/staticres/public-pc/js/article-content.js

@@ -1628,166 +1628,148 @@ var thishtlists = function(){
   var _id = goTemplateData.params.obj._id;
   var projectname = projectName;
   var projectcode = goTemplateData.params.obj.projectcode;
-  $.post("/front/pcAllNotice",{id:_id,projectname:projectname,projectcode:projectcode},function(D){
+  //$.post("/front/pcAllNotice",{id:_id,projectname:projectname,projectcode:projectcode},function(D){
+  $.post("/bigmember/follow/project/detail",{sid:_id},function(D){
     thishtlists_hasLoad=true;
-    var htdata = D.data["res"]
-    if(htdata&&htdata.length>0){
-      var htlist = D.data["res"];
-      var hthtml = '';
-      var myflag = true;
-      for(var i in htlist){
-        var listone = htlist[i]
-        var httime = listone["l_publishtime"];
-        var mytime = goTemplateData.params.obj.publishtime;
-        if(httime>mytime){
-          hthtml += '<div class="htlist"><div style="width: 80px;text-align: right;">'
-          if(htdiff!=""&&htdiff!=0){
-            var htdiff = timeDiff(new Date(Number(httime+"000")));
-            hthtml += '<span class="noticetime">'+htdiff+'</span>'
-          }else{
-            hthtml += '<span class="noticetime"></span>'
-          }
-          var httype = listone["s_subtype"]
-          if(typeof(httype) == "undefined" || httype == null || httype == ""){
-            httype = listone["s_toptype"]
-          }
-          if(typeof(httype) == "undefined" || httype == null || httype == ""){
-            httype = listone["s_type"];
-            if(httype == "bid"){
-              httype = "中标";
-            }else if(httype == "tender"){
-              httype = "招标";
-            }else{
-              httype = "";
-            }
-          }
-          if(httype!=""){
-            hthtml += '<span class="type">'+httype+'</span>'
-          }
-          hthtml += '</div><div class="timeaxis"><span></span></div>'
-          if(typeof(listone["s_eid"])!=""){
-            hthtml += '<div><a target="_blank" href="/article/content/'+listone["s_eid"]+'.html">'
-          }else{
-            hthtml += '<div><a target="_blank" href="#">'
-          }
-          if(listone["s_title"]!=""){
-            var listtitle = listone["s_title"];
-            listtitle = keyWordHighlight(listtitle,projectname,"<span style='color:#2cb7ca;'>$1</span>");
-            hthtml += listtitle
-          }
-          hthtml +='</a></div></div>'
-        }else if(httime<=mytime){
-          if(myflag){
-            hthtml += '<div class="htlist"><div style="width: 80px;text-align: right;">'
-            if($("#statusbar .com-time").text()!=undefined&&$("#statusbar .com-time").text()!=""){
-              hthtml += '<span class="noticetime">'+$("#statusbar .com-time").text()+'</span>'
-            }else{
-              hthtml += '<span class="noticetime"></span>'
-            }
-            if($("#statusbar .com-type").text()!=undefined&&$("#statusbar .com-type").text()!=""){
-              hthtml += '<span class="type">'+$("#statusbar .com-type").text()+'</span>'
-            }
-            hthtml += '</div><div class="timeaxis"><span></span></div>'
-            if(_id){
-              hthtml += '<div><a target="_blank" href="/article/content/'+_id+'.html">'
-            }else{
-              hthtml += '<div><a target="_blank" href="#">'
-            }
-            if(titleCopyDec!=""){
-              var listtitle = titleCopyDec;
-              listtitle = keyWordHighlight(listtitle,projectname,"<span  style='color:#2cb7ca;'>$1</span>");
-              hthtml += listtitle
-            }
-            hthtml +='</a></div></div>'
-            myflag = false;
-          }
-          hthtml += '<div class="htlist"><div style="width: 80px;text-align: right;">'
-          if(htdiff!=""&&httime!=0){
-            var htdiff = timeDiff(new Date(Number(httime+"000")));
-            hthtml += '<span class="noticetime">'+htdiff+'</span>'
-          }else{
-            hthtml += '<span class="noticetime"></span>'
-          }
-          var httype = listone["s_subtype"]
-          if(typeof(httype) == "undefined" || httype == null || httype == ""){
-            httype = listone["s_toptype"]
-          }
-          if(typeof(httype) == "undefined" || httype == null || httype == ""){
-            httype = listone["s_type"];
-            if(httype == "bid"){
-              httype = "中标";
-            }else if(httype == "tender"){
-              httype = "招标";
-            }else{
-              httype = "";
-            }
-          }
-          if(httype!=""){
-            hthtml += '<span class="type">'+httype+'</span>'
-          }
-          hthtml += '</div><div class="timeaxis"><span></span></div>'
-          if(typeof(listone["s_eid"])!=""){
-            hthtml += '<div><a target="_blank" href="/article/content/'+listone["s_eid"]+'.html">'
-          }else{
-            hthtml += '<div><a target="_blank" href="#">'
-          }
-          if(listone["s_title"]!=""){
-            var listtitle = listone["s_title"];
-            listtitle = keyWordHighlight(listtitle,projectname,"<span style='color:#2cb7ca;'>$1</span>");
-            hthtml += listtitle
-          }
-          hthtml +='</a></div></div>'
-        }
-      }
-      if(myflag){
-        hthtml += '<div class="htlist"><div style="width: 80px;text-align: right;">'
-        if($("#statusbar .com-time").text()!=undefined&&$("#statusbar .com-time").text()!=""){
-          hthtml += '<span class="noticetime">'+$("#statusbar .com-time").text()+'</span>'
-        }else{
-          hthtml += '<span class="noticetime"></span>'
-        }
-        if($("#statusbar .com-type").text()!=undefined&&$("#statusbar .com-type").text()!=""){
-          hthtml += '<span class="type">'+$("#statusbar .com-type").text()+'</span>'
-        }
-        hthtml += '</div><div class="timeaxis"><span></span></div>'
-        if(_id){
-          hthtml += '<div><a target="_blank" href="/article/content/'+_id+'.html">'
-        }else{
-          hthtml += '<div><a target="_blank" href="#">'
-        }
-        if(titleCopyDec!=""){
-          var listtitle = titleCopyDec;
-          listtitle = keyWordHighlight(listtitle,projectname,"<span  style='color:#2cb7ca;'>$1</span>");
-          hthtml += listtitle
-        }
-        hthtml +='</a></div></div>'
-        myflag = false;
-      }
-      $(".animathistory .htcontent").append(hthtml);
-    }else{
-      var hthtml = '<div class="htlist"><div style="width: 80px;text-align: right;">'
-      if($("#statusbar .com-time").text()!=undefined&&$("#statusbar .com-time").text()!=""){
-        hthtml += '<span class="noticetime">'+$("#statusbar .com-time").text()+'</span>'
-      }else{
-        hthtml += '<span class="noticetime"></span>'
-      }
-      if($("#statusbar .com-type").text()!=undefined&&$("#statusbar .com-type").text()!=""){
-        hthtml += '<span class="type">'+$("#statusbar .com-type").text()+'</span>'
-      }
-      hthtml += '</div><div class="timeaxis"><span></span></div>'
-      if(_id){
-        hthtml += '<div><a target="_blank" href="/article/content/'+_id+'.html">'
-      }else{
-        hthtml += '<div><a target="_blank" href="#">'
-      }
-      if(titleCopyDec!=""){
-        var listtitle = titleCopyDec;
-        listtitle = keyWordHighlight(listtitle,projectname,"<span  style='color:#2cb7ca;'>$1</span>");
-        hthtml += listtitle
-      }
-      hthtml +='</a></div></div>'
-
-      $(".animathistory .htcontent").append(hthtml);
+    if (D.error_code == 0){
+    	var resdata = D.data
+        var projectInfos = resdata.projectInfo
+        var projectName = projectInfos.projectname
+        var htlist = projectInfos.list
+	    if(htlist&&htlist.length>0){
+	      var hthtml = '';
+	      var myflag = true;
+	      for(var i=htlist.length-1;i>=0;i--){
+			myflag = false
+	        var listone = htlist[i]
+	        var httime = listone["l_publishtime"];
+	        var mytime = goTemplateData.params.obj.publishtime;
+	        if(httime>mytime){
+	          hthtml += '<div class="htlist"><div style="width: 80px;text-align: right;">'
+	          if(htdiff!=""&&htdiff!=0){
+	            var htdiff = timeDiff(new Date(Number(httime+"000")));
+	            hthtml += '<span class="noticetime">'+htdiff+'</span>'
+	          }else{
+	            hthtml += '<span class="noticetime"></span>'
+	          }
+	          var httype = listone["s_subtype"]
+	          if(typeof(httype) == "undefined" || httype == null || httype == ""){
+	            httype = listone["s_toptype"]
+	          }
+	          if(typeof(httype) == "undefined" || httype == null || httype == ""){
+	            httype = listone["s_type"];
+	            if(httype == "bid"){
+	              httype = "中标";
+	            }else if(httype == "tender"){
+	              httype = "招标";
+	            }else{
+	              httype = "";
+	            }
+	          }
+	          if(httype!=""){
+	            hthtml += '<span class="type">'+httype+'</span>'
+	          }
+	          hthtml += '</div><div class="timeaxis"><span></span></div>'
+	          if(typeof(listone["s_id"])!=""){
+	            hthtml += '<div><a target="_blank" href="/article/content/'+listone["s_id"]+'.html">'
+	          }else{
+	            hthtml += '<div><a target="_blank" href="#">'
+	          }
+	          if(listone["s_title"]!=""){
+	            var listtitle = listone["s_title"];
+	            listtitle = keyWordHighlight(listtitle,projectname,"<span style='color:#2cb7ca;'>$1</span>");
+	            hthtml += listtitle
+	          }
+	          hthtml +='</a></div></div>'
+	        }else if(httime<=mytime){
+	          hthtml += '<div class="htlist"><div style="width: 80px;text-align: right;">'
+	          if(htdiff!=""&&httime!=0){
+	            var htdiff = timeDiff(new Date(Number(httime+"000")));
+	            hthtml += '<span class="noticetime">'+htdiff+'</span>'
+	          }else{
+	            hthtml += '<span class="noticetime"></span>'
+	          }
+	          var httype = listone["s_subtype"]
+	          if(typeof(httype) == "undefined" || httype == null || httype == ""){
+	            httype = listone["s_toptype"]
+	          }
+	          if(typeof(httype) == "undefined" || httype == null || httype == ""){
+	            httype = listone["s_type"];
+	            if(httype == "bid"){
+	              httype = "中标";
+	            }else if(httype == "tender"){
+	              httype = "招标";
+	            }else{
+	              httype = "";
+	            }
+	          }
+	          if(httype!=""){
+	            hthtml += '<span class="type">'+httype+'</span>'
+	          }
+	          hthtml += '</div><div class="timeaxis"><span></span></div>'
+	          if(typeof(listone["s_id"])!=""){
+	            hthtml += '<div><a target="_blank" href="/article/content/'+listone["s_id"]+'.html">'
+	          }else{
+	            hthtml += '<div><a target="_blank" href="#">'
+	          }
+	          if(listone["s_title"]!=""){
+	            var listtitle = listone["s_title"];
+	            listtitle = keyWordHighlight(listtitle,projectname,"<span style='color:#2cb7ca;'>$1</span>");
+	            hthtml += listtitle
+	          }
+	          hthtml +='</a></div></div>'
+	        }
+	      }
+	      if(myflag){
+	        hthtml += '<div class="htlist"><div style="width: 80px;text-align: right;">'
+	        if($("#statusbar .com-time").text()!=undefined&&$("#statusbar .com-time").text()!=""){
+	          hthtml += '<span class="noticetime">'+$("#statusbar .com-time").text()+'</span>'
+	        }else{
+	          hthtml += '<span class="noticetime"></span>'
+	        }
+	        if($("#statusbar .com-type").text()!=undefined&&$("#statusbar .com-type").text()!=""){
+	          hthtml += '<span class="type">'+$("#statusbar .com-type").text()+'</span>'
+	        }
+	        hthtml += '</div><div class="timeaxis"><span></span></div>'
+	        if(_id){
+	          hthtml += '<div><a target="_blank" href="/article/content/'+_id+'.html">'
+	        }else{
+	          hthtml += '<div><a target="_blank" href="#">'
+	        }
+	        if(titleCopyDec!=""){
+	          var listtitle = titleCopyDec;
+	          listtitle = keyWordHighlight(listtitle,projectname,"<span  style='color:#2cb7ca;'>$1</span>");
+	          hthtml += listtitle
+	        }
+	        hthtml +='</a></div></div>'
+	        myflag = false;
+	      }
+	      $(".animathistory .htcontent").append(hthtml);
+	    }else{
+	      var hthtml = '<div class="htlist"><div style="width: 80px;text-align: right;">'
+	      if($("#statusbar .com-time").text()!=undefined&&$("#statusbar .com-time").text()!=""){
+	        hthtml += '<span class="noticetime">'+$("#statusbar .com-time").text()+'</span>'
+	      }else{
+	        hthtml += '<span class="noticetime"></span>'
+	      }
+	      if($("#statusbar .com-type").text()!=undefined&&$("#statusbar .com-type").text()!=""){
+	        hthtml += '<span class="type">'+$("#statusbar .com-type").text()+'</span>'
+	      }
+	      hthtml += '</div><div class="timeaxis"><span></span></div>'
+	      if(_id){
+	        hthtml += '<div><a target="_blank" href="/article/content/'+_id+'.html">'
+	      }else{
+	        hthtml += '<div><a target="_blank" href="#">'
+	      }
+	      if(titleCopyDec!=""){
+	        var listtitle = titleCopyDec;
+	        listtitle = keyWordHighlight(listtitle,projectname,"<span  style='color:#2cb7ca;'>$1</span>");
+	        hthtml += listtitle
+	      }
+	      hthtml +='</a></div></div>'
+	
+	      $(".animathistory .htcontent").append(hthtml);
+	    }
     }
     $(".htlist").find("a").mouseover(function(){
       $(this).find("span").css("color","#fe7379");