Pārlūkot izejas kodu

Merge branch 'develop' of git.sagacloud.cn:web/wanda-bm-guide into develop

guoxiaohuan 4 gadi atpakaļ
vecāks
revīzija
0e54a989ae
2 mainītis faili ar 9 papildinājumiem un 8 dzēšanām
  1. 1 1
      src/components/menuList.vue
  2. 8 7
      src/router/index.js

+ 1 - 1
src/components/menuList.vue

@@ -175,7 +175,7 @@ export default {
         dumpLegend() {
             const { conf } = window.__systemConf,
                 { wandaBmGuideUrl } = conf
-            window.open(`${wandaBmGuideUrl}home/legendLibrary`, true)
+            window.open(`${wandaBmGuideUrl}home/legendLibrary?token=${this.$store.state.ssoToken}`, true)
         }
     }
 }

+ 8 - 7
src/router/index.js

@@ -1,9 +1,7 @@
 import Vue from "vue"
 import store from "@/store"
 import VueRouter from "vue-router"
-import {
-    query
-} from "@/utils/query"
+import { query } from "@/utils/query"
 Vue.use(VueRouter)
 
 const routes = [
@@ -22,7 +20,8 @@ const routes = [
         name: "home",
         component: () => import("../views/index"),
         redirect: "/home/first",
-        children: [{
+        children: [
+            {
                 path: "first",
                 component: () => import("../views/first"),
             },
@@ -70,7 +69,7 @@ const router = new VueRouter({
     routes,
 })
 //不需要token的路由
-const ignore = ["/404", "/legendLibrary", "/legendRules"]
+const ignore = ["/404"]
 router.beforeEach(async (to, from, next) => {
     if (!ignore.includes(to.path)) {
         const token = query().token
@@ -95,7 +94,9 @@ router.beforeEach(async (to, from, next) => {
             let ssoServer = "http://oauth.wanda-dev.cn"
             let systemcode = "CAD156",
                 signal = new Date().getTime(),
-                version = "1.0.0"
+                version = "1.0.0",
+                returnUrl = window.location.protocol + '//' + window.location.host
+
             window.location.href = `${ssoServer}/login?systemcode=${systemcode}&signal=${signal}&version=${version}`
         }
     } else {
@@ -103,4 +104,4 @@ router.beforeEach(async (to, from, next) => {
         return
     }
 })
-export default router
+export default router