Prechádzať zdrojové kódy

修改网页标题
登录页区分

彭宇 2 rokov pred
rodič
commit
61f604b35c
1 zmenil súbory, kde vykonal 10 pridanie a 1 odobranie
  1. 10 1
      src/components/v-fastmenu.vue

+ 10 - 1
src/components/v-fastmenu.vue

@@ -22,7 +22,7 @@
 						<el-button type="primary" size="small" @click="resetPwd">修改密码</el-button>
 						<el-button type="warning" size="small" @click="logout">退出登录</el-button>
 					</div>
-					<a href="http://117.78.49.164:15001/index58" style="border-top: 1px solid #334780;"><i class="el-icon-s-home"></i>返回首页</a>
+          <el-link type="primary" @click="backToMainPage" style="border-top: 1px solid #334780;" icon="el-icon-s-home">返回首页</el-link>
 <!--					<a href="#"><i class="el-icon-monitor"></i>管理系统</a>-->
 				</div>
 				<div slot="reference" style="text-align: center; width:4rem;height:3rem;">
@@ -69,6 +69,15 @@ import { getUserProfile } from "@/api/system/user";
       this.getUser()
     },
 		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/index58"
+        window.location.href = toUrl
+      },
       getUser(){
         getUserProfile().then(response => {
           this.nickName=response.data.nickName