<script>
import {useUserStore} from "./pinia/UserStore/index.js";
import {toPage} from "./utils/uils.js";

export default {
    onLaunch: function () {
    },
    onShow: function () {
        // #ifndef MP-WEIXIN
        const UserStore = useUserStore();
        if (!UserStore.isLogin && window.location.href.indexOf('/pages/register/index') < 0) {
            toPage('/pages/login/index');
        }
        // #endif
    },
    onHide: function () {
    },
}
</script>

<style>
/* #ifdef MP-WEIXIN */
@import "weapp-tailwindcss/css";

@source not "dist";
/* #endif */
</style>
