You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.3 KiB

2 years ago
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
2 years ago
import { Message } from "element-ui";
2 years ago
export default {
name: "App",
metaInfo() {
return {
title:
this.$store.state.settings.dynamicTitle &&
this.$store.state.settings.title,
titleTemplate: (title) => {
return title
? `${title} - ${process.env.VUE_APP_TITLE}`
: process.env.VUE_APP_TITLE;
},
};
},
mounted() {
2 years ago
// 获取地址栏参数
var queryString = window.location.search;
// 创建 URLSearchParams 对象
var params = new URLSearchParams(queryString);
// 创建空的 JSON 对象
var obj = {};
// 遍历参数,并将其添加到 JSON 对象中
params.forEach(function (value, key) {
// 对地址栏参数进行解码
var decodedValue = decodeURIComponent(value);
obj[key] = decodedValue;
});
if (obj.token) {
localStorage.setItem("MSSM-LIAONING__TOKEN", obj.token);
} else {
this.$alert("暂无token",'提示', {
confirmButtonText: "返回",
callback: (action) => {
this.$router.go(-1);
},
});
}
this.$store.commit("app/URLChange", obj);
2 years ago
},
};
</script>
<style>
::-webkit-scrollbar {
width: 0 !important;
}
::-webkit-scrollbar {
2 years ago
width: 0 !important;
height: 0;
2 years ago
}
</style>