Kaynağa Gözat

Merge branch 'dev/v4.8.30_zxl' of qmx/jy into feature/v4.8.30

zhangxinlei1996 2 yıl önce
ebeveyn
işleme
9dcb5be2c4

+ 3 - 3
src/jfw/front/swordfish.go

@@ -375,7 +375,6 @@ func getLastNewsData(searchvalue, area, city, publishtime, subtype, industry, mi
 		}
 	}
 	limitCount := int64(bidsearch.SearchMaxPageCount_PC)
-	log.Println("######%%%", count)
 	if count > limitCount {
 		count = limitCount
 	}
@@ -971,7 +970,7 @@ func bidDataConvert(id string, datas *[]map[string]interface{}) (array []map[str
 		diff := ""
 		publishtime, _ := v["publishtime"].(float64)
 		if publishtime != 0 {
-			diff = util.TimeDiff(time.Unix(util.Int64All(publishtime), 0))
+			diff = time.Unix(util.Int64All(publishtime), 0).Format(Date_Short_Layout)
 			v["pbtime"] = util.Int64All(publishtime)
 		}
 		v["publishtime"] = diff
@@ -1607,7 +1606,8 @@ func searchresulthtml(list *[]map[string]interface{}) string {
 		}
 		publishtime, _ := listdata["publishtime"].(float64)
 		if publishtime != 0 {
-			diff := util.TimeDiff(time.Unix(util.Int64All(publishtime), 0))
+			// diff := util.TimeDiff(time.Unix(util.Int64All(publishtime), 0))
+			diff := time.Unix(util.Int64All(publishtime), 0).Format(Date_Short_Layout)
 			if diff != "" {
 				listhtml += `<span class="com-time">` + diff + `</span>`
 			}

+ 1 - 1
src/jfw/modules/app/src/web/templates/weixin/wxinfocontent.html

@@ -466,7 +466,7 @@
                     <div class="time_label">
                       <script>
                           var l_publishtime = {{.T.obj.l_publishtime}};
-                          if(l_publishtime != ""){
+                          if((l_publishtime != "") &&(l_publishtime !=null)){
                               var tdf = new Date(parseInt(l_publishtime*1000)).pattern('yyyy-MM-dd');
                               if(tdf != null){
                                   // document.write("<div class='timebefore_vip'><i class='glyphicon bofangjilu'></i>"+tdf+"</div>");

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

@@ -1127,7 +1127,7 @@ $(function(){
   $(".otherinfo .com-time").each(function(){
     var thisValue = $(this).attr("data-value");
     if(thisValue != "" && thisValue != "0" && thisValue != 0){
-      var diff = timeDiff(new Date(Number(thisValue+"000")));
+      var diff = new Date(parseInt(l_publishtime*1000)).pattern('yyyy-MM-dd');
       if(diff != null){
         $(this).text(diff);
       }
@@ -1841,7 +1841,7 @@ if (amount!=""){
   $(".com-statusbar").append('<span class="com-amount"><a>'+conversionMoeny(amount)+'</a></span>');
 }
 //
-if(publishtime != ""){
+if(publishtime != "" && typeof(publishtime) != "undefined"){
   var diff =new Date(parseInt(publishtime*1000)).pattern('yyyy-MM-dd');
   if(diff != null){
     $(".com-statusbar").append('<span class="com-time"><i class="glyphicon bofangjilu"></i>'+diff+'</span>');

+ 1 - 1
src/web/templates/weixin/wxinfocontent_rec.html

@@ -1006,7 +1006,7 @@ body .loading_ p span {
 		<div class="time_label">
 			<script>
 				var l_publishtime = {{.T.obj.l_publishtime}};
-					if(l_publishtime != ""){
+					if(l_publishtime != "" && l_publishtime!=null){
              var tdf = new Date(parseInt(l_publishtime*1000)).pattern('yyyy-MM-dd');
 						if(tdf != null){
 							document.write("<div class='timebefore_vip'>"+tdf+"</div>");