Pārlūkot izejas kodu

返回首页 动态配置

彭宇 2 gadi atpakaļ
vecāks
revīzija
9ece129faf
1 mainītis faili ar 6 papildinājumiem un 8 dzēšanām
  1. 6 8
      src/components/v-fastmenu.vue

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

@@ -39,6 +39,9 @@
 <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() {
@@ -70,14 +73,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 => {