Merge branch 'main' of https://git.cityme.com.cn/xiangshan/ggfwjsc
This commit is contained in:
commit
50454c3ada
23
src/main.js
23
src/main.js
|
@ -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");
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue