关于清空cookie遇到的问题

       logout() {
            this.$axios.get('/media/logout').then(() => {
                  this.delCookie();
location.reload();
              
            })
        },

为啥会点击两次才会退出

将位置互换之后就点击一次退出登录就行

 logout() {
            this.$axios.get('/media/logout').then(() => {
                location.reload();
                this.delCookie();}

 

posted @ 2020-07-23 11:08  走在路上的张先森  阅读(230)  评论(2编辑  收藏  举报