浏览代码

Merge branch 'http_mock' into http_test

qinzhipeng_v@didiglobal.com 4 年之前
父节点
当前提交
14e3f0d173
共有 3 个文件被更改,包括 12 次插入5 次删除
  1. 2 1
      src/apiConfig/requestIP.js
  2. 7 2
      src/components/newLayout/Head.vue
  3. 3 2
      src/views/home/index.vue

+ 2 - 1
src/apiConfig/requestIP.js

@@ -4,7 +4,7 @@ export let requestIp = host + '/zuul'
 export let loginUrl = host + '/sso/login?jumpto=' + 'http://zhihui-test.intra.xiaojukeji.com' + location.pathname
 export let logoutUrl = host + '/sso/logout?jumpto=' + 'http://zhihui-test.intra.xiaojukeji.com' + location.pathname
 export let envTag = 'test'
-
+export let envUrl = 'http://10.190.5.126:8897/#/env'
 if (location.host.indexOf('localhost') < 0) {
   host = 'http://' + location.host
   requestIp = host + '/zuul'
@@ -14,6 +14,7 @@ if (location.host.indexOf('localhost') < 0) {
     envTag = 'pre'
   } else if (host.indexOf('zhihui.xiaojukeji.com') >= 0) {
     envTag = 'online'
+    envUrl = 'http://zhihui-env.intra.xiaojukeji.com/#/env'
   }
 }
 

+ 7 - 2
src/components/newLayout/Head.vue

@@ -96,7 +96,7 @@ import { mapGetters } from 'vuex'
 import routes from '@/router/newRouter'
 import websocket from '@/views/workbench/mixins/websocket'
 import { memberGetLoginInMemberInfoByLdap } from '@/api/projectIndex'
-import { logoutUrl } from '@/apiConfig/requestIP.js'
+import { logoutUrl, envUrl } from '@/apiConfig/requestIP.js'
 import { verifyIsAdmin } from '@/api/configure.js'
 export default {
   mixins: [websocket],
@@ -128,7 +128,12 @@ export default {
   methods: {
     goto(name) {
       window.log({ c: 'project', d: `goto_${name}` })
-      this.$router.push({ name })
+      // this.$router.push({ name })
+      if (name === 'env') {
+        window.open(envUrl, '_self')
+      } else {
+        this.$router.push({ name })
+      }
     },
     getTarget() {
       this.target = !this.target

+ 3 - 2
src/views/home/index.vue

@@ -291,7 +291,7 @@ img.img-arrow {
 <script>
 import { mapGetters } from 'vuex'
 import FloatMenu from './floatMenu'
-import { logoutUrl } from '@/apiConfig/requestIP.js'
+import { logoutUrl, envUrl } from '@/apiConfig/requestIP.js'
 import { settingUserGetBiz } from '@/api/projectIndex'
 import { materialGetMaterialList } from '@/api/monthly/index.js'
 
@@ -360,7 +360,8 @@ export default {
     handleSelect(key, keyPath) {
       switch (key) {
         case '1':
-          this.$router.push({ name: 'env' })
+          // this.$router.push({ name: 'env' })
+          window.open(envUrl, '_self')
           break
         case '2':
           this.$router.push({ name: 'Interface' })