Переглянути джерело

Merge branch 'develop' of http://192.168.3.17/gitlab/zhanghongbo/qfw into develop

zhanghongbo 9 роки тому
батько
коміт
3886cdb680

+ 1 - 1
core/src/timetask.json

@@ -1 +1 @@
-{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-22 17:02:43"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-22 17:02:43"}},"marketisstart":true,"marketrate":300}
+{"comment":{"c_rate":720,"commentrate":900},"market":{"demand":{"attr":["i_hits","i_bids","i_status"],"timepoint":"2016-01-22 20:24:52"},"service":{"attr":["i_hits","i_sales","i_comments","i_score","i_appcounts"],"timepoint":"2016-01-22 20:24:52"}},"marketisstart":true,"marketrate":300}

+ 9 - 6
core/src/web/staticres/js/entportrait.js

@@ -17,12 +17,7 @@ $(function(){
 			//设置地图上显示的位置
 			$("#location").attr("value",as1);
 			$("#cityname").attr("value",pt.trim()+ct.trim()+at.trim());		
-			//获取地图的经纬度
-			loadJS("http://api.map.baidu.com/getscript?v=2&ak=AFd8b176f363f23e6a23d516f4cfb742&services=&t=20150522093217",function(){
-				loadJS("/js/geocoder.js",function(){
-					doOptions();
-				});
-			});
+			initMap();
 			$("#city_china").text(pt+ct+at+as1);
 		});
 	}
@@ -47,6 +42,14 @@ $(function(){
 	});
 	pcShare();
 });
+function initMap(){
+	//获取地图的经纬度
+	loadJS("http://api.map.baidu.com/getscript?v=2&ak=AFd8b176f363f23e6a23d516f4cfb742&services=&t=20150522093217",function(){
+		loadJS("/js/geocoder.js",function(){
+			doOptions();
+		});
+	});
+}
 //显示地图
 function showMap(){
 	document.getElementById('mapshowdiv').style.display = 'block';

+ 1 - 1
core/src/web/templates/swordfish/wxtoolbar.html

@@ -102,7 +102,7 @@ $(function(){
 		}
 	});
 	//
-	initShare("{{.T.signature}}",shareid);
+	initShare({{.T.signature}},typeof(shareid)=="undefined"?"":shareid);
 });
 //意见反馈
 function Feedback(){

+ 2 - 2
core/src/web/templates/yellowpage/enterpriseinfo.html

@@ -88,9 +88,7 @@
 					</span>
 					<input id="location" type="hidden" value="{{if .T.res.Dom}}{{.T.res.Dom}}{{end}}">
 					<input id="cityname" type="hidden" value="">
-					{{if or .T.res.s_address}}
 					<a href="javascript:void(0)" onclick="showMap()">查看详细地图</a>
-					{{end}}
 				{{end}}
 			</div>
 		</div>
@@ -412,6 +410,8 @@ var as1="{{.T.res.s_address}}";
 var address=false,$listent=false;
 {{if or .T.res.i_province .T.res.i_city .T.res.i_area .T.res.s_address}}
 	address = true;
+{{else if .T.res.Dom}}
+	initMap();
 {{end}}
 </script>
 </html>

+ 15 - 11
push/src/qfw/push/dopush/dopush.go

@@ -130,20 +130,24 @@ func Send(k *push.MemberInterest, v *list.List, now time.Time, TITLEA, ShortTitl
 	lastInfoDate := int64(0)
 	firstTitle := ""
 	publishTimes := map[string]interface{}{}
+	publishTitle := map[string]bool{}
 	for ks := v.Front(); ks != nil; ks = ks.Next() {
 		k2 := *(ks.Value.(*map[string]interface{}))
-		i++
-		if i == 1 {
-			firstTitle = strings.Replace(k2["title"].(string), "\n", "", -1)
-			lastInfoDate = k2["publishtime"].(int64)
-		}
-		str += "<div class='tslist'><span class='xh'>" + fmt.Sprintf("%d", i) + ".</span><a class='bt' target='_blank' href='" + k2["href"].(string) + "'>" + strings.Replace(k2["title"].(string), "\n", "", -1) + "</a></div>"
-		publishTimes[strconv.Itoa(i)] = k2["publishtime"]
-		if i >= MaxPushSize {
-			//限制最大信息条数
-			break
+		title := strings.Replace(k2["title"].(string), "\n", "", -1)
+		if !publishTitle[title] {
+			publishTitle[title] = true
+			i++
+			if i == 1 {
+				firstTitle = title
+				lastInfoDate = k2["publishtime"].(int64)
+			}
+			str += "<div class='tslist'><span class='xh'>" + fmt.Sprintf("%d", i) + ".</span><a class='bt' target='_blank' href='" + k2["href"].(string) + "'>" + title + "</a></div>"
+			publishTimes[strconv.Itoa(i)] = k2["publishtime"]
+			if i >= MaxPushSize {
+				//限制最大信息条数
+				break
+			}
 		}
-
 	}
 	TITLE := TITLEA + fmt.Sprintf("%d条,关键词(%s)", i, strings.Join(k.Interest, ";"))
 	WXTitle := fmt.Sprintf("%s《%s》%s", func() string {