十一、点击页面某一个按钮判断是否已经登录

mui("body").on('tap','#self',function(){

        if(window.localStorage.length == 0) {

            window.location.href="login.html";

        } else {

            window.location.href="m-personal-center.html";

        }

    })

posted @ 2018-05-29 11:48  杰_森  阅读(266)  评论(0编辑  收藏  举报