|
|
|
@ -1,59 +1,23 @@ |
|
|
|
<script> |
|
|
|
import { |
|
|
|
defaultRequest, |
|
|
|
defaultRequest4 |
|
|
|
} from 'api/index.js' |
|
|
|
import {defaultRequest,defaultRequest4} from 'api/index.js' |
|
|
|
var jpushModule = uni.requireNativePlugin("JG-JPush"); |
|
|
|
export default { |
|
|
|
data() { |
|
|
|
data(){ |
|
|
|
return { |
|
|
|
globalData:{ |
|
|
|
|
|
|
|
}, |
|
|
|
backButtonPress: 0, |
|
|
|
backButtonPress:0, |
|
|
|
} |
|
|
|
}, |
|
|
|
onLaunch: function() { |
|
|
|
// 判断是否有网络(尝试解决IOS白屏) |
|
|
|
// uni.getNetworkType({ |
|
|
|
// success: function (res) { |
|
|
|
// console.log(res.networkType);//网络类型 wifi、2g、3g、4g、ethernet、unknown、none |
|
|
|
// if(res.networkType === "none"){ |
|
|
|
// console.log("当前无网络"); |
|
|
|
// this.globalData.typee = 1; |
|
|
|
// console.log('=====', this.globalData.typee) |
|
|
|
// }else{ |
|
|
|
// 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 结束 |
|
|
|
let channel=plus.runtime.channel || ''; |
|
|
|
let channelName=''; |
|
|
|
let isInstall=0; |
|
|
|
let firstTime=uni.getStorageSync('firstTime') || ''; |
|
|
|
if(!firstTime){ |
|
|
|
isInstall=1; |
|
|
|
uni.setStorageSync('firstTime','1'); |
|
|
|
} |
|
|
|
addAppCount({channel:channel,is_install:isInstall}); |
|
|
|
|
|
|
|
// console.log('App Launch') |
|
|
|
uni.hideTabBar() |
|
|
|
// uni.onTabBarMidButtonTap(()=>{ |
|
|
|
@ -65,15 +29,15 @@ |
|
|
|
// animationType:'slide-in-bottom' |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// plus.screen.lockOrientation("portrait-primary"); |
|
|
|
plus.screen.lockOrientation("portrait-primary"); |
|
|
|
setTimeout(() => { |
|
|
|
// plus.navigator.closeSplashscreen(); |
|
|
|
plus.navigator.closeSplashscreen(); |
|
|
|
}, 2400); |
|
|
|
|
|
|
|
//#ifdef APP-PLUS |
|
|
|
jpushModule.setLoggerEnable(true); |
|
|
|
jpushModule.initJPushService() |
|
|
|
jpushModule.addConnectEventListener(result => { |
|
|
|
jpushModule.addConnectEventListener(result=>{ |
|
|
|
let connectEnable = result.connectEnable |
|
|
|
console.log("jpush连接", connectEnable) |
|
|
|
}) |
|
|
|
@ -135,10 +99,10 @@ |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="scss"> |
|
|
|
|
|
|
|
/*每个页面公共css */ |
|
|
|
@import "@/common/common.scss"; |
|
|
|
|
|
|
|
page { |
|
|
|
page{ |
|
|
|
overflow-x: hidden; |
|
|
|
} |
|
|
|
</style> |
|
|
|
|