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.

113 lines
2.9 KiB

<template>
<div id="app">
<router-view />
</div>
</template>
<script>
import { Message, MessageBox } 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;
// });
const params = new URLSearchParams(window.location.href.split("?")[1]);
// 获取某个参数的值
const type = params.get("type");
const flag = params.get("flag");
const data = params.get("data");
const token = params.get("token");
let obj = {
type,
flag,
data,
token
}
console.log(888,obj);
if (
obj.token == undefined
) {
console.log(89);
MessageBox.confirm("token不能为空", "系统提示", {
confirmButtonText: "返回",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
this.$router.go(-1);
})
.catch(() => {
this.$router.go(-1);
});
} else {
console.log(111);
localStorage.setItem("MSSM-LIAONING__TOKEN", obj.token);
this.$store.commit("app/URLChange", obj);
}
// var obj = {};
// window.addEventListener("message", function (event) {
// console.log(888, event);
// obj = event.data.data;
// console.log(999, obj);
// if (obj?.token) {
// console.log(100, obj);
// localStorage.setItem("MSSM-LIAONING__TOKEN", obj.token);
// } else {
// this.$alert("token不能为空", "提示", {
// confirmButtonText: "返回",
// callback: (action) => {
// this.$router.go(-1);
// },
// });
// }
// this.$store.commit("app/URLChange", obj);
// });
},
};
/**
sudo mv html.zip /usr/share/nginx/html/ggfw-iframe 在 MSSM-Dev 文件夹下 移动压缩包到 ggfw文件夹下
cd /usr/share/nginx/html/ggfw-iframe 移动到文件夹下
unzip html.zip -d . 解压
rm ./html.zip 删除当前目录下的压缩包 弹出确定删除 打 y 并回车
*/
</script>
<style>
::-webkit-scrollbar {
width: 0 !important;
}
::-webkit-scrollbar {
width: 0 !important;
height: 0;
}
</style>