Newer
Older
gdtMimiProgram / App.vue
dutingting on 21 Nov 2022 1 KB 登录完成+消息ui完成

<script>
	import { getLogin } from '@/utils/auth.js';
	export default {
		onLaunch: function() {
			console.log('App Launch');
			// const updateManager = wx.getUpdateManager();
			// updateManager.applyUpdate();
			// updateManager.onCheckForUpdate(function (res) {
			//   console.log('onCheckForUpdate', res);
			// });
			// updateManager.onUpdateReady(function () {
			//   wx.showModal({
			//     title: '更新提示',
			//     content: '新版本已经准备好,是否重启应用?',
			//     success: function (res) {
			//       if (res.confirm) {
			//         updateManager.applyUpdate();
			//       }
			//     },
			//   });
			// });
			// updateManager.onUpdateFailed(function () {
			//   uni.showToast({
			//     title: '新版本下载失败,请重启',
			//     icon: 'none'
			//   });
			// });
			
			const sessionId = uni.getStorageSync('sessionId');
			console.log('-----', sessionId);
			if (!sessionId) {
			  getLogin();
			}
		},
		onShow: function() {
			console.log('App Show')
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "@/uni_modules/uview-ui/index.scss";
	page {
		background-color: #f0f0f0;
	  width: 100%;
	  height: 100%;
		-webkit-text-size-adjust: none;
	}
</style>