var pc_menuid = 0; var nopicpath = "/Jzw/Tpl/Home/Default/Public/nopic.jpg"; //榛樿鍥剧墖 $(function () { //鏄剧ず榛樿鍥剧墖 $(".pics").find("img").each(function () { if ($(this).attr("src") == "") { $(this).attr("src", nopicpath); } }); }); //瀹㈡湇閾炬帴缁熶竴鎵撳紑 //鏀剧疆model_foot.html // function sayKeFu(type = 0) { var path = ""; if (type == 0) { path = $("#aFootKefu_qq").attr("href");//QQ } else { path = $("#aFootKefu_sq").attr("href");//鍟嗘ˉ } var newTab = window.open('about:blank'); $.ajax({ success: function (data) { if (data) { newTab.location.href = path; } } }); } //鎻愪氦鐣欒█ function submitMessage(dataValue, method, callback) { $.ajax({ url: "/index.php?g=Home&m=Index&a=" + method, type: "get", data: dataValue, dataType: "text", success: function (result) { if (result == "ok") { callback(); } else { alert(result); } }, error: function () { } }); } //瑙嗛 function videoData(dataValue, method, callback) { $.ajax({ url: "/index.php?g=Home&m=Index&a=" + method, type: "get", data: dataValue, dataType: "json", success: function (result) { callback(result); }, error: function () { } }); } //鍔犺浇鑱旂郴鎴戜滑鍦板浘PC //璋冪敤鏂瑰紡 //loadContactMap('content','{$site_name}','{$address}','{$tel}','{$baiduxy}'.split(',')[0],'{$baiduxy}'.split(',')[1]); function loadContactMap(id, site_name, address, tel, bdx, bdy) { var map = new BMap.Map(id); var point = new BMap.Point(bdx, bdy); map.centerAndZoom(point, 15); var marker = new BMap.Marker(point); // 鍒涘缓鏍囨敞 map.addOverlay(marker); var opts = { width: 300, // 淇℃伅绐楀彛瀹藉害 height: 80, // 淇℃伅绐楀彛楂樺害 title: "" + site_name + "" // 淇℃伅绐楀彛鏍囬 } var infoWindow = new BMap.InfoWindow( "鍦板潃锛? + address + "
鑱旂郴鐢佃瘽锛? + tel + "
", opts); // 鍒涘缓淇℃伅绐楀彛瀵硅薄 map.openInfoWindow(infoWindow, map.getCenter()); // 鎵撳紑淇℃伅绐楀彛 map.addControl(new BMap.NavigationControl()); map.enableScrollWheelZoom(); } //鍔ㄦ€佸姞杞藉崟琛ㄦ暟鎹 function loadData(table, nowPage, catids, size, t) { myajax("/index.php?g=Wap&m=Index&a=getData", { table: table, catids: catids, nowPage: nowPage, size: size, t: t }, "json", "get", getData); } //鎵嬫満绔垎椤佃烦杞 function linkgo(obj) { window.location.href = $(obj).find("option:selected").val(); } //=======================================閫氱敤JS======================================== // 灏佽Ajax璋冪敤 闇€寮曠敤layer.js鍜宭ayer.css // // var ajaxLoadIndex; function myajax(url, data, dataType, type, responseFun) { $.ajax({ url: url, data: data, dataType: dataType, type: type, success: responseFun, beforeSend: beforeSend, error: error }); } function beforeSend() { //鍔犺浇灞 // ajaxLoadIndex = layer.load(0, { // shade: false // }); } function error() { //鎻愮ず灞 layer.msg('璇锋眰澶辫触'); //layerUI } //灏佽ajax end