| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- <template>
- <div id="app" :style="'font-family:' + fontStyle">
- <router-view v-if="refresh" />
- </div>
- </template>
- <script>
- export default {
- name: 'App',
- provide() {
- return {
- reload: this.reload,
- }
- },
- data() {
- return {
- refresh: true, // 控制整个页面刷新
- fontStyle: '',
- }
- },
- methods: {
- reload() {
- this.refresh = false
- this.$nextTick(() => {
- this.refresh = true
- })
- },
- },
- watch: {
- fontStyle(val) {
- // //console.log(val);
- },
- },
- mounted() {
- var that = this
- // 关于客户系统嵌套大数据平台代码 --勿删勿动
- // window.parent.postMessage(
- // {
- // test: "123",
- // },
- // "*"
- // );
- window.addEventListener('message', function (e) {
- if (e.data.send) {
- localStorage.setItem('session', e.data.send)
- localStorage.setItem('isLogin', true)
- if (e.data.url) {
- that.$router.push(e.data.url)
- } else {
- that.$router.push('/index/home')
- }
- }
- })
- // -------------------------------------------------
- if (localStorage.getItem('fontStyle') == null) {
- this.fontStyle = 'missyuan'
- } else {
- this.fontStyle = localStorage.getItem('fontStyle')
- document.querySelector('body').style.fontFamily = this.fontStyle
- }
- var param = window.name
- localStorage.setItem('iframeurl', param)
- // var version = JSON.stringify(process.env.VUE_APP_VERSION)
- // console.log(version)
- console.log('测试')
- },
- }
- </script>
- <style lang="less" scoped>
- @import '/assets/css/glass.css';
- @font-face {
- font-family: 'missyuan';
- src: url('assets/font/missyuan/SourceHanSans-Regular.otf');
- }
- html,
- body {
- height: 100%;
- width: 100%;
- margin: 0;
- font-family: 'missyuan';
- #app {
- height: 100%;
- width: 100%;
- position: absolute;
- left: 0;
- top: 0;
- background: #f1f1f1;
- }
- }
- /deep/ .el-button,
- button,
- input {
- font-family: 'missyuan' !important;
- }
- /deep/.customClass {
- .el-loading-spinner {
- i.el-icon-loading {
- color: #dcdfe6 !important;
- }
- .el-loading-text {
- color: #dcdfe6 !important;
- }
- }
- }
- /deep/ .el-breadcrumb__inner:hover {
- cursor: default !important;
- }
- // 所有卡片d
- /deep/ .custom-ffffff .el-card.is-always-shadow {
- border-radius: 10px;
- }
- // /deep/ .el-col>.is-always-shadow:hover{
- // transform:scale(1.03)
- // }
- // 所有弹框
- /deep/ .custom-ffffff .el-dialog {
- border-radius: 5px;
- }
- /deep/ .custom-ffffff .el-dialog__header {
- border-radius: 5px 5px 0 0;
- }
- /deep/ li.el-select-dropdown__item {
- font-family: 'missyuan' !important;
- }
- /deep/ .el-input__inner {
- font-family: 'missyuan';
- }
- </style>
|