<script>
    import store from "./store/user";
    export default {
        onLaunch: function () {
            // app内禁止横屏
            plus.screen.lockOrientation("portrait-primary");
            console.log("App Launch");

            console.log(process.env.NODE_ENV, "当前运行环境····");
        },
        onShow: async function () {
            console.log("App Show");
            const { data: res } = await this.$api.index.getUserInfo();
            store.commit("SET_PERMISSIONS", res.permissions);
        },
        onHide: function () {
            console.log("App Hide");
        },
    };
</script>

<style lang="scss">
    /*每个页面公共css */
    @import "@/uni_modules/uview-ui/index.scss";
</style>
