Jelajahi Sumber

返回首页 动态配置

彭宇 2 tahun lalu
induk
melakukan
c988e5ffd4
2 mengubah file dengan 14 tambahan dan 9 penghapusan
  1. 8 0
      src/api/system/config.js
  2. 6 9
      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'
+  })
+}

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

@@ -39,6 +39,7 @@
 <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,15 +71,11 @@ import { getUserProfile } from "@/api/system/user";
           this.isResetPwd=true
         });
       },
-			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/index58"
-				window.location.href = toUrl
-			},
+      backToMainPage(){
+        selectConfigKey('backToMainPage').then(res => {
+          window.location.href = res.data;
+        })
+      },
       async logout() {
         this.$confirm('确定注销并退出系统吗?', '提示', {
           confirmButtonText: '确定',