Browse Source

修改白屏

master
torsenli 3 years ago
parent
commit
964b89979a
  1. 72
      App.vue

72
App.vue

@ -1,59 +1,23 @@
<script> <script>
import { import {defaultRequest,defaultRequest4} from 'api/index.js'
defaultRequest,
defaultRequest4
} from 'api/index.js'
var jpushModule = uni.requireNativePlugin("JG-JPush"); var jpushModule = uni.requireNativePlugin("JG-JPush");
export default { export default {
data() { data(){
return { return {
globalData:{ backButtonPress:0,
},
backButtonPress: 0,
} }
}, },
onLaunch: function() { onLaunch: function() {
// (IOS) let channel=plus.runtime.channel || '';
// uni.getNetworkType({ let channelName='';
// success: function (res) { let isInstall=0;
// console.log(res.networkType);// wifi2g3g4gethernetunknownnone let firstTime=uni.getStorageSync('firstTime') || '';
// if(res.networkType === "none"){ if(!firstTime){
// console.log(""); isInstall=1;
// this.globalData.typee = 1; uni.setStorageSync('firstTime','1');
// console.log('=====', this.globalData.typee) }
// }else{ addAppCount({channel:channel,is_install:isInstall});
// this.globalData.typee = 0
// console.log('==',this.globalData.typee)
// }
// }
// });
// alert(this.globalData.type)
// ios
// uni.getSystemInfo({
// success: (res) => {
// if (res.platform == 'ios') {
// const query = uni.createSelectorQuery().in(this);
// var isRecovery = true;
// query
// .select('#containerId')
// .boundingClientRect(data => {
// isRecovery = false;
// })
// .exec();
// var timer = setTimeout(() => {
// if (isRecovery) {
// uni.reLaunch({
// url: '/pages/tabbar/user/user'
// })
// clearTimeout(timer);
// timer = null;
// }
// }, 500)
// }
// },
// })
// ios
// console.log('App Launch') // console.log('App Launch')
uni.hideTabBar() uni.hideTabBar()
// uni.onTabBarMidButtonTap(()=>{ // uni.onTabBarMidButtonTap(()=>{
@ -65,15 +29,15 @@
// animationType:'slide-in-bottom' // animationType:'slide-in-bottom'
// }) // })
// }) // })
// plus.screen.lockOrientation("portrait-primary"); plus.screen.lockOrientation("portrait-primary");
setTimeout(() => { setTimeout(() => {
// plus.navigator.closeSplashscreen(); plus.navigator.closeSplashscreen();
}, 2400); }, 2400);
//#ifdef APP-PLUS //#ifdef APP-PLUS
jpushModule.setLoggerEnable(true); jpushModule.setLoggerEnable(true);
jpushModule.initJPushService() jpushModule.initJPushService()
jpushModule.addConnectEventListener(result => { jpushModule.addConnectEventListener(result=>{
let connectEnable = result.connectEnable let connectEnable = result.connectEnable
console.log("jpush连接", connectEnable) console.log("jpush连接", connectEnable)
}) })
@ -135,10 +99,10 @@
</script> </script>
<style lang="scss"> <style lang="scss">
/*每个页面公共css */ /*每个页面公共css */
@import "@/common/common.scss"; @import "@/common/common.scss";
page{
page {
overflow-x: hidden; overflow-x: hidden;
} }
</style> </style>

Loading…
Cancel
Save