//等待效果 function waiting(){ $('body').append('
'); } //移除等待效果 function complete(){ $('.load_effect').remove(); } // 动态加载js封装函数 function loadScript(url, callback) { var script = document.createElement("script"); script.type = "text/javascript"; if (typeof(callback) != "undefined") { if (script.readyState) { script.onreadystatechange = function() { if (script.readyState == "loaded" || script.readyState == "complete") { script.onreadystatechange = null; callback(); } }; } else { script.onload = function() { callback(); }; } }; script.src = url; document.body.appendChild(script); } // 文档加载完成后添加首页图标代码,并执行拖曳函数 $(document).ready(function(){ // console.log(menulisturi); if(menulisturi == 'Index/index' || menulistblockuri == 'Staff' || menulisturi == 'Index/test' || menulisturi == 'Index/loadindex' || menulisturi == 'Index/wxzyIndex' || menulistblockuri == 'Magazine' || menulistblockuri == 'Zywebsite'|| menulistblockuri == 'Zymap'){ }else{ //使用封装函数动态加载js并在加载成功时doing thing loadScript("/Public/Wap/js/Inertia.js?v=2018042", function() { var html = ''; $('body').append(html); $('.ball').css('display','block'); //加载,并执行回调函数 new Inertia(document.getElementById('ball')); }); } }); //手机端消息提示 function showInfo(msg, type, fun1, fun2){ var type = arguments[1] ? arguments[1] : 1, fun1 = arguments[2] ? arguments[2] : null, fun2 = arguments[3] ? arguments[3] : null, html = '

' + msg + '

'; if(type == 1){ html += '
确定
'; }else{ html += '

'; } html += '
'; $('body').append(html); //确定事件处理 $('.show_msg_div .show_msg_ok').click(function(){ fun1 && fun1();hideInfo(); }); //取消事件处理 $('.show_msg_div .show_msg_cancel').click(function(){ fun2 && fun2(); hideInfo(); }); } //手机端消息提示 function showInfoEnroll(msg, type, fun1, fun2){ var type = arguments[1] ? arguments[1] : 1, fun1 = arguments[2] ? arguments[2] : null, fun2 = arguments[3] ? arguments[3] : null, html = '

' + msg + '

'; if(type == 1){ html += '
确定
'; }else{ html += '

'; } html += '
'; $('body').append(html); //确定事件处理 $('.show_msgEnroll_div .show_msgEnroll_ok').click(function(){ fun1 && fun1(); $('.show_msgEnroll_bg').remove(); }); //取消事件处理 $('.show_msgEnroll_div .show_msgEnroll_cancel').click(function(){ fun2 && fun2(); $('.show_msgEnroll_bg').remove(); }); } //
//
//

【通知】关于二次停水供水的通知

//
//
// 文案文案文案文案文案文案文案文案文 // 文案文案文案文案文案文案文案文案文案文 // 文案文案文案文案文案文案文案文案文案文 // 文案文案文案文案文案文案文案文案文案文 // 文案文案文案文案文案文案文案文案文案文 // 文案文案文案文案文案文案文案文案文案文 // 案案案案案案 // 文案文案文案文案文案文案文案文案文 // 案文案文案文案文案文案文案文案 // 案文案文案文案文案文案文案文案 //
//
//

// 查看详情 //

//
//
function showNotice(title,msg,linkmsg,link){ var title = arguments[0] ? arguments[0] : '这是一个默认标题', msg = arguments[1] ? arguments[1] : '这是一个默认内容', linkmsg = arguments[2] ? arguments[2] : '查看详情', link = arguments[3] ? arguments[3] : null, html = `

`+title+`

` +msg+ `

` +linkmsg+ `

`; $('body').append(html); $('.showNotice_main .showNotice_Btn').click(function(){ if(link == null || link == '' || link == undefined){ $('.showNotice,.showNotice_main').remove(); }else{ window.location.href = link; } }); $(document).click(function(){ $('.showNotice,.showNotice_main').remove(); }) $(document).on('click','.showNotice_main,.navLookInfo',function(e){ e.stopPropagation(); }) } //手机端消息提示 function showShare(msg){ var msg = msg ? msg : '点击分享给好友'; var html = `

`+msg+`

`; $('body').append(html); //确定事件处理 $('.shareToOther .shareToOtherClose').click(function(){ $('.shareToOther').remove(); }); } function showInfoIntro(msg){ var msg = arguments[0] ? arguments[0] : ''; if(msg.length>0){ var html = `
` +msg+ `
`; $('body').append(html); $('.showRecommend_main .showRecommend_Btn').click(function(){ if(link == null || link == '' || link == undefined){ $('.showRecommend,.showRecommend_main').remove(); }else{ window.location.href = link; } }); $(document).click(function(){ $('.showRecommend,.showRecommend_main').remove(); }) $(document).on('click','.showRecommend_main,.navLookInfo',function(e){ e.stopPropagation(); }) } } //支付成功后消息提示 function showInfoPay(msg, type,tips1,tips2, fun1, fun2){ var type = arguments[1] ? arguments[1] : 1, fun3 = arguments[4] ? arguments[4] : null, fun4 = arguments[5] ? arguments[5] : null, html = '

' + msg + '

'; if(type == 1){ html += '
'+tips1+'
'; }else{ html += '

'; } html += '
'; $('body').append(html); //确定事件处理 $('.show_msg_div .show_msg_ok').click(function(){ fun1 && fun1(); hideInfo(); }); //取消事件处理 $('.show_msg_div .show_msg_cancel').click(function(){ fun2 && fun2(); hideInfo(); }); } //关闭消息提示 function hideInfo(){ $('.show_msg_bg,.show_msg_div').remove(); } //手机端Confirm提示 function showConfirm(msg,url){ if(url === undefined){ html = '
' + msg + ''; html += '

'; html += '
'; } else{ html = '
' + msg + ''; html += '

'; html += '
'; } $('body').append(html); //确定事件处理 $('.show_msg_div .show_msg_ok').click(function(){ window.location.href=url; }); //取消事件处理 $('.show_msg_div .show_msg_cancel').click(function(){ $('.show_msg_bg').hide(); $('.show_msg_div').hide(); }); } //定义事件,刷新本页面操作 function showConfirmRecord(msg){ html = '
' + msg + ''; html += '

'; html += '
'; $('body').append(html); //确定事件处理 $('.show_msg_div .show_msg_ok').click(function(){ window.location.reload(); }); } var u = navigator.userAgent; var isiOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); $("input,textarea").blur(function(){ if (isiOS) { temporaryRepair(); } }); function temporaryRepair(){ var currentPosition,timer; var speed=1;//页面滚动距离 timer=setInterval(function(){ currentPosition=document.documentElement.scrollTop || document.body.scrollTop; currentPosition-=speed; window.scrollTo(0,currentPosition);//页面向上滚动 currentPosition+=speed; //speed变量 window.scrollTo(0,currentPosition);//页面向下滚动 clearInterval(timer); },1); }