<script>
	export default {
        globalData() {
        },
		onLaunch(options) {
            let userToken = this.vuex_user_token;
            let notLogin = [
                'pages/login/login',
            ];
            if(!userToken && (notLogin.indexOf(options.path) === -1)){
                let arr = [];
                for (const key in options.query) {
                    arr.push(`${key}=${options.query[key]}`)
                }
                this.$jump({
                    url: `/pages/login/login?redirect=${options.path}&${arr.join("&")}`,
                    type: 'redirect',
                });
            }
		},
        onShow(options){
            console.log('app show -->')
        },
        onLoad(option) {
            console.log('app load -->')
        }
    }
</script>

<style lang="scss">
	@import "uview-ui/index.scss";
</style>
