Files
xl-mobile/src/App.vue
王一嘉 7885f0e2e0 update
2025-07-28 18:08:42 +08:00

31 lines
819 B
Vue

<script>
import {useUserStore} from "./pinia/UserStore/index.js";
import {toPage} from "./utils/uils.js";
import {useSystemStore} from "./pinia/SystemStore/index.js";
export default {
onLaunch: function () {
},
onShow: function () {
// #ifndef MP-WEIXIN
const UserStore = useUserStore();
if (!UserStore.isLogin && window.location.href.indexOf('/pages/register/index') < 0 && window.location.href.indexOf('/pages/fastInput/index') < 0) {
toPage('/pages/login/index');
}
const SystemStore = useSystemStore();
SystemStore.getMessageCount();
// #endif
},
onHide: function () {
},
}
</script>
<style>
/* #ifdef MP-WEIXIN */
@import "weapp-tailwindcss/css";
@source not "dist";
/* #endif */
</style>