main.js
Vue.prototype.$setFullScreen = () => {
let pages = getCurrentPages();
let page = pages[pages.length - 1];
page.$getAppWebview().setStyle({
height: Vue.prototype.windowHeight + 'px'
})
}
let main = plus.android.runtimeMainActivity();
plus.runtime.quit = function() {
main.moveTaskToBack(false);
};
plus.nativeUI.toast = (function(str) {
if (str == '再按一次退出应用') {
main.moveTaskToBack(false);
return false;
}
});
vue.app
onLaunch: function() {
plus.screen.unlockOrientation()
plus.navigator.setFullscreen(true)
plus.navigator.hideSystemNavigation()
uni.getSystemInfo({
success: function(e) {
console.log(e)
if (e.platform == "android") {
Vue.prototype.windowHeight = e.windowHeight + 50
}
}
})
},
页面