This commit is contained in:
duanxiaohai 2024-09-27 16:37:35 +08:00
parent 3c28d9cb54
commit 747e58aa59
3 changed files with 17 additions and 24 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -1,15 +1,15 @@
import { createApp } from 'vue' import { createApp } from "vue";
import './style.css' import "./style.css";
import App from './App.vue' import App from "./App.vue";
// 引入路由 // 引入路由
import router from "./router"; import router from "./router";
import ElementPlus from 'element-plus' import ElementPlus from "element-plus";
import 'element-plus/dist/index.css' import "element-plus/dist/index.css";
import './assets/css/common.css' import "./assets/css/common.css";
import zhCn from 'element-plus/dist/locale/zh-cn.mjs' import zhCn from "element-plus/dist/locale/zh-cn.mjs";
// 引入 vConsole // 引入 vConsole
import VConsole from 'vconsole'; import VConsole from "vconsole";
// 初始化 vConsole // 初始化 vConsole
const vConsole = new VConsole(); const vConsole = new VConsole();
// const vConsole = new VConsole({ // const vConsole = new VConsole({
@ -20,6 +20,9 @@ const vConsole = new VConsole();
// } // }
// }); // });
createApp(App).use(router).use(ElementPlus,{ createApp(App)
.use(router)
.use(ElementPlus, {
locale: zhCn, locale: zhCn,
}).mount('#app') })
.mount("#app");

View File

@ -148,7 +148,8 @@ const login = () => {
.then((response) => { .then((response) => {
if (response.code == 200) { if (response.code == 200) {
console.log("response", response); console.log("response", response);
tools.data.set("token", response.data.token); // var token = getCookie("lytoken");
tools.data.set("token", response.data);
tools.data.set("type", 1); tools.data.set("type", 1);
} else { } else {
// //
@ -190,19 +191,8 @@ const reset_font = () => {
document.querySelector("#m").style.transform = document.querySelector("#m").style.transform =
"scale(" + width / 1920 + "," + height / 1080 + ")"; "scale(" + width / 1920 + "," + height / 1080 + ")";
}; };
// cookie
// function clearCookies() {
// const cookies = document.cookie.split(";");
// for (let i = 0; i < cookies.length; i++) {
// const cookie = cookies[i];
// const eqPos = cookie.indexOf("=");
// const name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
// document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/;";
// }
// }
onMounted(() => { onMounted(() => {
// cookie
// clearCookies();
console.log("页面初始化"); console.log("页面初始化");
login(); login();