flat: init
This commit is contained in:
26
App.vue
Normal file
26
App.vue
Normal file
@@ -0,0 +1,26 @@
|
||||
<script setup>
|
||||
import useUserStore from './stores/useUserStore';
|
||||
import { onLaunch, onShow, onHide } from '@dcloudio/uni-app';
|
||||
const userStore = useUserStore();
|
||||
onLaunch(() => {
|
||||
console.log('App Launch');
|
||||
let openId = uni.getStorageSync('openId') || ''; // 同步获取 缓存信息
|
||||
|
||||
if (openId) {
|
||||
console.log('有openid');
|
||||
} else {
|
||||
console.log('没有openid');
|
||||
}
|
||||
});
|
||||
onShow(() => {
|
||||
console.log('App Show');
|
||||
});
|
||||
onHide(() => {
|
||||
console.log('App Hide');
|
||||
});
|
||||
</script>
|
||||
|
||||
<style>
|
||||
/*每个页面公共css */
|
||||
@import '@/common/common.css';
|
||||
</style>
|
Reference in New Issue
Block a user