diff --git a/fangija-zsyf/js/common.js b/fangija-zsyf/js/common.js index 1bf58bb..caac7b6 100644 --- a/fangija-zsyf/js/common.js +++ b/fangija-zsyf/js/common.js @@ -7,22 +7,40 @@ document.addEventListener('touchstart',shield,false);//取消浏览器的所有 document.oncontextmenu=shield;//屏蔽选择函数 // H5 plus事件处理 var ws=null,as='pop-in'; +(function() { + var first = null; + mui.back = function() { //首次按键,提示‘再按一次退出应用’ + if (!first) { + first = new Date().getTime(); + mui.toast('再按一次退出应用'); + setTimeout(function() { + first = null; + }, 1000); + } else { + if (new Date().getTime() - first > 1000) { + plus.runtime.quit(); + } + } + }; +}) function plusReady(){ - ws=plus.webview.currentWebview(); + /*ws=plus.webview.currentWebview(); // Android处理返回键 plus.key.addEventListener('backbutton',function(){ - /*if (ws.id == 'yfindex.html') { + if (ws.id == 'yfindex.html') { + alert("aa") plus.nativeUI.confirm("确认退出",function(e) { + alert(e.index); if(e.index == 0) { plus.runtime.quit(); } }); } else { back(); - }*/ + } back(); },false); - compatibleAdjust(); + compatibleAdjust();*/ } if(w.plus){ plusReady(); diff --git a/fangija-zsyf/views/house/add.html b/fangija-zsyf/views/house/add.html index da47150..cc3882b 100644 --- a/fangija-zsyf/views/house/add.html +++ b/fangija-zsyf/views/house/add.html @@ -47,7 +47,7 @@
城 市
- +
@@ -89,20 +89,6 @@ -
  • @@ -135,7 +121,7 @@
    -
    +
    diff --git a/fangija-zsyf/yfindex.html b/fangija-zsyf/yfindex.html index 0fa8d17..82622d5 100644 --- a/fangija-zsyf/yfindex.html +++ b/fangija-zsyf/yfindex.html @@ -1197,7 +1197,6 @@ String.prototype.endWith = function(str) { var reg = new RegExp(str + "$"); return reg.test(this); } - /** * 获取手机上的信息,比如位置,手机ID * @author yinjihuan