Sfoglia il codice sorgente

Merge remote-tracking branch 'origin/visu_environment' into visu_environment

wang_xy 2 anni fa
parent
commit
59d922876c
2 ha cambiato i file con 13 aggiunte e 8 eliminazioni
  1. 8 0
      src/api/system/config.js
  2. 5 8
      src/components/v-fastmenu.vue

+ 8 - 0
src/api/system/config.js

@@ -58,3 +58,11 @@ export function refreshCache() {
     method: 'delete'
   })
 }
+
+//获取配置信息
+export function selectConfigKey(configKey) {
+  return request({
+    url: '/system/config/selectConfigKey/' + configKey,
+    method: 'get'
+  })
+}

+ 5 - 8
src/components/v-fastmenu.vue

@@ -38,6 +38,8 @@
 <script>
 import resetPwd from "../views/system/user/profile/resetPwd";
 import { getUserProfile } from "@/api/system/user";
+import { selectConfigKey } from "@/api/system/config";
+
 	export default {
     components: {resetPwd },
 		data() {
@@ -69,14 +71,9 @@ import { getUserProfile } from "@/api/system/user";
     },
 		methods: {
       backToMainPage(){
-        let href = window.location.href
-        let protacal = href.substr(0,href.indexOf("://")+3)
-        let mo = href.lastIndexOf(":") > 6  ? href.lastIndexOf(":") : href.lastIndexOf("/")
-        let ip = href.substr(href.indexOf("://")+3,mo);
-        let url =href.substr(0,mo)
-        // let toUrl = url +":15001/newpage"
-        let toUrl = "http://10.6.52.1:15001/newpage"
-        window.location.href = toUrl
+        selectConfigKey('backToMainPage').then(res => {
+          window.location.href = res.data;
+        })
       },
       getUser(){
         getUserProfile().then(response => {