|
@@ -559,8 +559,24 @@ const router = new VueRouter({
|
|
|
|
|
|
router.beforeEach((to, from, next) => {
|
|
|
// 获取网页的来源地址
|
|
|
-var refull = document.referrer;
|
|
|
- if (to.path === '/admin/login'||to.path==='/'){
|
|
|
+// var refull = document.referrer;
|
|
|
+// console.log(refull)
|
|
|
+// console.log(document.referer);
|
|
|
+// console.log(document.domain);
|
|
|
+// console.log(location.host);
|
|
|
+// console.log(location.hostname);
|
|
|
+// console.log(location.pathname);
|
|
|
+// console.log(location.protocol);
|
|
|
+// console.log(location.origin);
|
|
|
+// console.log(location.href.indexOf("?token="));
|
|
|
+// console.log(location.href.substring(location.href.indexOf("?token=")+7,location.href.length),config.host);
|
|
|
+var index = location.href.indexOf("?token=")
|
|
|
+if(index>0){
|
|
|
+ var token = location.href.substring(location.href.indexOf("?token=")+7,location.href.length)
|
|
|
+ Cookies.set('token',token)
|
|
|
+ location.href = location.href.substring(0,location.href.indexOf("?token="))
|
|
|
+}
|
|
|
+else if (to.path === '/admin/login'||to.path==='/'){
|
|
|
if (to.meta.title) {
|
|
|
document.title = to.meta.title;
|
|
|
}
|