From 7cde297f0a99e060aea9bce60d1c121a14ae74d7 Mon Sep 17 00:00:00 2001 From: lixuliang <lixuliang_hd@126.com> Date: 星期四, 29 八月 2024 17:58:54 +0800 Subject: [PATCH] 新版 --- src/components/index.vue | 40 ++++++++++++++++++++++++++++++---------- 1 files changed, 30 insertions(+), 10 deletions(-) diff --git a/src/components/index.vue b/src/components/index.vue index c5a8428..4288b82 100644 --- a/src/components/index.vue +++ b/src/components/index.vue @@ -8,22 +8,17 @@ <ul> <li> <div class="item" @click="toggleLayout"> - <img src="../assets/img/left/analyse4.png" alt /> + <img src="../assets/img/document.png" /> </div> </li> <li> <div class="item"> - <img src="../assets/img/left/analyse4.png" alt /> + <img src="../assets/img/document.png" @click="toSysIndex" /> </div> </li> <li> - <div class="item"> - <img src="../assets/img/left/analyse4.png" alt /> - </div> - </li> - <li> - <div class="item"> - <img src="../assets/img/left/analyse4.png" alt /> + <div class="item" title="绯荤粺鐩戞帶"> + <img src="../assets/img/document.png" @click="tojk" /> </div> </li> </ul> @@ -204,9 +199,12 @@ <script> import mainIfo from "./mainIfo.vue"; +import URLconfig from "../../static/URLconfig"; +import { getToken } from "@/utils/auth"; +import { Notification, MessageBox, Message, Loading } from "element-ui"; + export default { name: "index", - components: { mainIfo }, data() { return { @@ -257,10 +255,32 @@ }, methods: { + checkToken(url) { + if (!getToken()) { + Message({ + message: "鏃犳晥鐨勪細璇濓紝鎴栬�呬細璇濆凡杩囨湡锛岃閲嶆柊鐧诲綍銆�", + type: "error" + }); + setTimeout(() => { + // 璺宠浆鍒扮櫥褰曢〉 + window.location.href = URLconfig.origin + URLconfig.loginUrl; + }, 3000); + } else { + window.open(url); + } + }, toggleLayout() { this.layout = this.layout === "three-columns" ? "two-columns" : "three-columns"; }, + toSysIndex() { + // 妫�鏌oken锛岃烦鍒板悗鍙扮郴缁� + this.checkToken("http://localhost:80" + URLconfig.adminUrl); // http://192.168.11.203:8090/sys/system/user + // this.checkToken(URLconfig.origin + URLconfig.adminUrl); // http://192.168.11.203:8090/sys/system/user + // console.log(URLconfig.origin + URLconfig.adminUrl); + // console.log(URLconfig.origin); + }, + tojk() {}, jumpTo(name) { switch (name) { case "XX姒傚康寮�鍙戜笌楠岃瘉骞冲彴": -- Gitblit v1.9.3