vue-router路由守衛
阿新 • • 發佈:2018-11-10
路由守衛及獲取cookie裡的GTICKET:
ROUTER. beforeEach(( to, from, next) => { var reg = new RegExp( '(^| )' + 'gTicket' + '=([^;]*)(;|$)') var arr = document. cookie. match( reg) const NEXTROUTER = [ 'index'路由守衛及獲取cookie裡的GTICKET:
ROUTER. beforeEach(( to, from, next) => { var reg = new RegExp( '(^| )' + 'gTicket' + '=([^;]*)(;|$)') var arr = document. cookie. match( reg) const NEXTROUTER = [ 'index'