This commit is contained in:
姚宇浩 2024-09-27 16:55:03 +08:00
commit 50454c3ada
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 './style.css'
import App from './App.vue'
import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";
// 引入路由
import router from "./router";
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './assets/css/common.css'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "./assets/css/common.css";
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
// 引入 vConsole
import VConsole from 'vconsole';
import VConsole from "vconsole";
// 初始化 vConsole
const vConsole = new VConsole();
// const vConsole = new VConsole({
@ -19,7 +19,10 @@ const vConsole = new VConsole();
// // 其他插件配置...
// }
// });
createApp(App).use(router).use(ElementPlus,{
createApp(App)
.use(router)
.use(ElementPlus, {
locale: zhCn,
}).mount('#app')
})
.mount("#app");

View File

@ -148,7 +148,8 @@ const login = () => {
.then((response) => {
if (response.code == 200) {
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);
} else {
//
@ -190,19 +191,8 @@ const reset_font = () => {
document.querySelector("#m").style.transform =
"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(() => {
// cookie
// clearCookies();
console.log("页面初始化");
login();