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.
|
|
|
<template>
|
|
|
|
<div id="app">
|
|
|
|
<router-view />
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
|
|
import { Message } from "element-ui";
|
|
|
|
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() {
|
|
|
|
// 获取地址栏参数
|
|
|
|
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);
|
|
|
|
},
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
<style>
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
width: 0 !important;
|
|
|
|
}
|
|
|
|
::-webkit-scrollbar {
|
|
|
|
width: 0 !important;
|
|
|
|
height: 0;
|
|
|
|
}
|
|
|
|
</style>
|