| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 | <script>	import {		onBackPress	} from "@dcloudio/uni-app"	import {		toast,		getUserIdentity	} from "@/utils/common";	import cacheManager from "@/utils/cacheManager.js";	export default {		// creat by wgy 0619  生命周期 钩子  		onLaunch: function() {			//console.log('App Launch')		},		onShow: function() {			// #ifdef APP-PLUS			if (cacheManager.get('auth')) {					uni.redirectTo({					url: `/pages/study/index`				})			} else {				cacheManager.clearAll()				uni.redirectTo({					url: '/pages/login/index'				});			}			const webview = plus.webview.currentWebview();			plus.key.addEventListener('backbutton', () => {				event.preventDefault();				return false			});			// #endif		},		onHide: function() {		//	console.log('App Hide')		}	}</script><style lang="scss">	/* 公共样式 */	@import '/common/styles/index.scss';	body,	html,	#app {		font-family: "Helvetica Neue", "Microsoft YaHei", "SimHei", "SimSun", "Arial", sans-serif;		margin: 0;		padding: 0;		box-sizing: border-box;	}</style>
 |