You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
713 B
Vue

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<script>
import { useAuthStore, useImageStore } from '@/store'
export default {
onLaunch: function () {
//每次小程序启动都尝试静默登录
// #ifdef MP-WEIXIN
useAuthStore().login();//微信小程序进入后先用openid登录
// #endif
// #ifdef H5
useAuthStore().loadInfo();//H5下进入后先尝试加载登录用户信息
// #endif
// 加载app图片
useImageStore().load();
},
onShow: function () {
console.log('App Show')
},
onHide: function () {
console.log('App Hide')
},
}
</script>
<style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import "uview-plus/index.scss";
@import "@/w-components/index.scss";
</style>