12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <script>
- import {
-
- } from './common/api.js'
- import {getAuthsArr,BeforeNavigateTo} from './common/utils.js'
- //#ifdef APP-PLUS
- import APPUpdate from '@/uni_modules/APPUpdate/js_sdk/appUpdate';
- //#endif
- export default {
- onLaunch: function() {
- const Token = uni.getStorageSync('xj-storage_token')
- if(Token){
- uni.reLaunch({
- url: '/pages/native/work',
- success:() => {
- plus.navigator.closeSplashscreen();
- }
- })
- }
- else{
- plus.navigator.closeSplashscreen();
- }
- //#ifdef APP-PLUS
- setTimeout(() =>{
- // APPUpdate()
- },5000)
- const _handlePush =(message) => {
- uni.switchTab({
- url:'/pages/native/news'
- })
- console.log(message)
- };
- plus.push.addEventListener('click', (message) => {
- _handlePush(message);
- });
- plus.push.addEventListener('receive',(message) => {
- _handlePush(message);
- });
- // #endif
- },
- onShow: function() {
-
- console.log('App Show')
- },
- onHide: function() {
- uni.closeSocket();
- console.log('App Hide')
- }
- }
- </script>
- <style lang="scss">
- @import "@/static/iconfont.css";
- @import '@/common/common.css';
- </style>
|