优化平台配置

This commit is contained in:
季圣华
2021-09-13 00:59:16 +08:00
parent 6d8e9177f7
commit e8acccd4ac
4 changed files with 94 additions and 16 deletions

View File

@@ -0,0 +1,57 @@
<template>
<div></div>
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN } from "@/store/mutation-types"
import {mixinDevice} from '@/utils/mixin.js'
export default {
name: "BillPrintIframe",
inject:['closeCurrent'],
mixins: [mixinDevice],
data () {
return {
url: "",
id:"",
height: ""
}
},
created () {
this.goUrl()
},
updated () {
this.goUrl()
},
watch: {
$route(to, from) {
this.goUrl();
}
},
methods: {
show(record, type) {
},
goUrl () {
let url = this.$route.meta.url
this.id = this.$route.path
if (this.isMobile()) {
this.height = 800
} else {
this.height = document.documentElement.clientHeight-130
}
console.log("------url------"+url)
console.log("------token------"+Vue.ls.get(ACCESS_TOKEN))
if (url !== null && url !== undefined) {
//外部url加入token
let token = Vue.ls.get(ACCESS_TOKEN);
this.url = url + '?token=' + token;
}
}
}
}
</script>
<style>
</style>