Merge branch 'YOUFANGAPP1.1' of 192.168.0.27:dev0/youfang-app into YOUFANGAPP1.1

This commit is contained in:
hubingliang
2018-04-03 09:45:47 +08:00
12 changed files with 795 additions and 435 deletions
+22 -4
View File
@@ -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();
+1
View File
@@ -78,6 +78,7 @@ $("#login_btn").on("click", function () {
var token = resData.data;
localStorage.setItem("user_token", token);
$.toast(resData.message);
back();
} else {
$.toast(resData.message);
}