فهرست منبع

修改网页标题
登录页区分

彭宇 2 سال پیش
والد
کامیت
525d7bc478
1فایلهای تغییر یافته به همراه10 افزوده شده و 1 حذف شده
  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>
 				</div>
 				<div slot="reference" style="text-align: center; width:4rem;height:3rem;">
 					<img src="@/assets/images/mascot-small.png" />
@@ -68,6 +68,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