|
@@ -9,16 +9,17 @@
|
|
|
|
|
|
<script>
|
|
|
import { isURL } from '@/utils/validate'
|
|
|
+import Cookies from 'js-cookie'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
|
- iframeURL: this.$route.meta.iframeURL,
|
|
|
+ iframeURL: this.addParams(this.$route.meta.iframeURL),
|
|
|
isIframe: false
|
|
|
}
|
|
|
},
|
|
|
watch: {
|
|
|
$route () {
|
|
|
- this.iframeURL = this.$route.meta.iframeURL
|
|
|
+ this.iframeURL = this.addParams(this.$route.meta.iframeURL)
|
|
|
this.initUrl()
|
|
|
}
|
|
|
},
|
|
@@ -32,6 +33,14 @@ export default {
|
|
|
// tabs, 是否通过iframe展示
|
|
|
tabIsIframe (url) {
|
|
|
return isURL(url)
|
|
|
+ },
|
|
|
+ addParams (url) {
|
|
|
+ let prevWord = '?'
|
|
|
+ if (url.indexOf(prevWord) > -1) {
|
|
|
+ prevWord = '&'
|
|
|
+ }
|
|
|
+ let _url = url + prevWord + 'sessionToken=' + Cookies.get('token')
|
|
|
+ return _url
|
|
|
}
|
|
|
}
|
|
|
}
|