Jelajahi Sumber

修改跳转

zhuliu 2 tahun lalu
induk
melakukan
71e888ae72

+ 18 - 2
RMS-FrontEnd/src/router/index.js

@@ -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;
     }

+ 2 - 2
RMS-FrontEnd/src/views/layout/components/UserBar.vue

@@ -170,7 +170,7 @@ export default {
         case 'AnalysisSystem':
           // window.open('http://139.224.24.90:80/workspace?token='+this.userinfo.token)
           
-          window.open(this.$c.pasURL + '/workspace')
+          window.open(this.$c.pasURL + '/workspace?token='+this.$cookie.get('token'))
           break; 
         case 'clientble':
           this.clientVisible = true
@@ -196,7 +196,7 @@ export default {
     },
     // 跳转标注库
     toIndicia() {
-      window.open(this.$c.pasURL + '/indicia')
+      window.open(this.$c.pasURL + '/indicia?token='+this.$cookie.get('token'))
     },
      //跳转到任务清单
      toTaskList(){