wang_xy преди 2 години
родител
ревизия
d0c95fad5d
променени са 1 файла, в които са добавени 24 реда и са изтрити 8 реда
  1. 24 8
      src/components/v-fastmenu.vue

+ 24 - 8
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://10.6.52.1:15001/newpage" 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;">
@@ -40,7 +40,7 @@
 import resetPwd from "../views/system/user/profile/resetPwd";
 import { getUserProfile } from "@/api/system/user";
 import { selectConfigKey } from "@/api/system/config";
-
+import Cookies from 'js-cookie';
 	export default {
     components: {resetPwd },
 		data() {
@@ -50,18 +50,39 @@ import { selectConfigKey } from "@/api/system/config";
         isResetPwd: false,
         nickName:null,
         deptNames:null,
-        phonenumber:null
+        phonenumber:null,
+				// fastMenu: [{
+				// 		name: '返回首页',
+				// 		path: '/',
+				// 		icon: 'el-icon-s-home',
+				// 		// msValue: 1
+				// 	},
+				// 	{
+				// 		name: '管理端',
+				// 		path: '/',
+				// 		icon: 'sj-icon-rwzx',
+				// 		// msValue: 2
+				// 	},
+				// ],
+
 			}
 		},
     created() {
       this.getUser()
     },
 		methods: {
+      backToMainPage(){
+        selectConfigKey('backToMainPage').then(res => {
+          window.location.href = res.data;
+        })
+      },
       getUser(){
         getUserProfile().then(response => {
           this.nickName=response.data.nickName
           this.deptNames=response.data.deptNames
           this.phonenumber=response.data.phonenumber
+          this.userId=response.data.userId
+          Cookies.set('userId',response.data.userId);
         });
       },
       resetPwd(){
@@ -72,11 +93,6 @@ import { selectConfigKey } from "@/api/system/config";
           this.isResetPwd=true
         });
       },
-      backToMainPage(){
-        selectConfigKey('backToMainPage').then(res => {
-          window.location.href = res.data;
-        })
-      },
       async logout() {
         this.$confirm('确定注销并退出系统吗?', '提示', {
           confirmButtonText: '确定',