This commit is contained in:
parent
3c28d9cb54
commit
747e58aa59
23
src/main.js
23
src/main.js
|
@ -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({
|
||||
|
@ -20,6 +20,9 @@ const vConsole = new VConsole();
|
|||
// }
|
||||
// });
|
||||
|
||||
createApp(App).use(router).use(ElementPlus,{
|
||||
createApp(App)
|
||||
.use(router)
|
||||
.use(ElementPlus, {
|
||||
locale: zhCn,
|
||||
}).mount('#app')
|
||||
})
|
||||
.mount("#app");
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue