Browse Source

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

renzheng 9 years ago
parent
commit
d50e8f211f

+ 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>