| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <template>
- <div>
- <iframe style="width: 100%; height: 100vh" :src="link + `?token=${token}`">
- </iframe>
- </div>
- </template>
-
- <script>
- import { getToken } from '@/utils/token-util';
- export default {
- data() {
- return {
- link: '',
- token: ''
- };
- },
- mounted() {
- // if (this.$route.query && this.$route.query.link) {
- // this.link = this.$route.query.link;
- // }
- },
- watch: {
- // 监视搜索词变化
- '$route.query.link': {
- immediate: true,
- handler() {
- // console.log(2222);
- this.link = this.$route.query.link;
- this.token = getToken();
- }
- }
- },
- methods: {}
- };
- </script>
-
- <style lang="scss" scoped>
- </style>
-
|