127 lines
2.4 KiB
Vue
127 lines
2.4 KiB
Vue
<template>
|
|
<a-config-provider :autoInsertSpaceInButton="false" :locale="locale">
|
|
<router-view />
|
|
</a-config-provider>
|
|
</template>
|
|
|
|
<script>
|
|
import locale from "ant-design-vue/es/locale/zh_CN";
|
|
import "moment/locale/zh-cn";
|
|
import { watch,onMounted } from "vue";
|
|
import { useRoute ,useRouter} from "vue-router";
|
|
import { useStore } from 'vuex';
|
|
export default {
|
|
setup() {
|
|
const route = useRoute();
|
|
const router = useRouter();
|
|
const store = useStore()
|
|
console.log(route);
|
|
const setToken = () => {
|
|
if (!!route.query.token) {
|
|
localStorage.setItem("plantToken", route.query.token);
|
|
}
|
|
};
|
|
watch(
|
|
() => route.query.token,
|
|
() => {
|
|
setToken();
|
|
}
|
|
);
|
|
setToken();
|
|
// const getNewToken =async ()=>{
|
|
// // 默认单点登录
|
|
// let {data} = await store.dispatch('common/getYlToken')
|
|
// console.log('data',data);
|
|
// window.localStorage.plantId = data?.id
|
|
// window.localStorage.plantUserInfo = JSON.stringify(data)
|
|
// }
|
|
// onMounted(()=>{
|
|
// router.beforeEach((to, from) => {
|
|
// if(to.path!= "/answer"){
|
|
// getNewToken()
|
|
// }
|
|
// })
|
|
// })
|
|
return {
|
|
locale,
|
|
};
|
|
},
|
|
};
|
|
</script>
|
|
<style lang="scss">
|
|
@import "./style/customize/index.scss";
|
|
@import "./style/utils.scss";
|
|
|
|
@font-face {
|
|
font-display: optional;
|
|
font-family: "SourceHanSana-Normal";
|
|
src: url(#{$baseOss}/fonts/SourceHanSans-Normal.ttf);
|
|
}
|
|
|
|
|
|
*{
|
|
font-family: inherit;
|
|
}
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
a {
|
|
text-decoration: none;
|
|
}
|
|
|
|
textarea {
|
|
resize: none;
|
|
}
|
|
|
|
div {
|
|
word-break: break-all;
|
|
}
|
|
|
|
.scrollbar,.ant-table-body,.vxe-table--body-wrapper {
|
|
&::-webkit-scrollbar {
|
|
width: 6px;
|
|
height: 6px;
|
|
background-color: #ffffff;
|
|
}
|
|
|
|
&::-webkit-scrollbar-thumb {
|
|
background-color: #D8D8D8;
|
|
border-radius: 10px;
|
|
}
|
|
}
|
|
.ant-table-hide-scrollbar {
|
|
padding-right: 6px !important;
|
|
overflow-y: hidden !important;
|
|
}
|
|
@media screen and (min-width: 600px) {
|
|
html,
|
|
body {
|
|
& *:not(p, strong, em, p span) {
|
|
font-size: 14px;
|
|
}
|
|
}
|
|
}
|
|
|
|
// /*<=1024的设备*/
|
|
// @media (max-width: 1024px){
|
|
// html,
|
|
// body,
|
|
// * {font-size: 14px}
|
|
// }
|
|
/*<=600的设备*/
|
|
@media (max-width: 600px) {
|
|
html,
|
|
body {
|
|
& *:not(p, strong, em, p span) {
|
|
font-size: 16px;
|
|
}
|
|
}
|
|
}
|
|
strong {
|
|
// font-family: "Noto Sans CJK SC Medium", "Source Han Sans CN Medium" !important;
|
|
font-weight: bolder !important;
|
|
}
|
|
</style>
|