【fix ESLint】src/components/layouts

This commit is contained in:
danshihao
2023-03-06 09:55:27 +08:00
parent 689c988642
commit e60ab2b2e1
5 changed files with 28 additions and 29 deletions
@@ -7,8 +7,8 @@
<script>
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import PageLayout from '../page/PageLayout'
import RouteView from './RouteView'
// import PageLayout from '../page/PageLayout'
// import RouteView from './RouteView'
export default {
name: 'IframePageContent',
@@ -26,22 +26,22 @@ export default {
this.goUrl()
},
watch: {
$route (to, from) {
$route (/* to, from */) {
this.goUrl()
}
},
methods: {
goUrl () {
const url = this.$route.meta.url
const id = this.$route.path
this.id = id
this.id = this.$route.path
// url = "http://www.baidu.com"
console.log('------url------' + url)
if (url !== null && url !== undefined) {
// -----------------------------------------------------------------------------------------
// url支持通过 ${token}方式传递当前登录TOKEN
// eslint-disable-next-line no-template-curly-in-string
const tokenStr = '${token}'
if (url.indexOf(tokenStr) != -1) {
if (url.indexOf(tokenStr) !== -1) {
const token = Vue.ls.get(ACCESS_TOKEN)
this.url = url.replace(tokenStr, token)
} else {
@@ -50,7 +50,7 @@ export default {
// -----------------------------------------------------------------------------------------
/* update_begin author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
if (this.$route.meta.internalOrExternal != undefined && this.$route.meta.internalOrExternal == true) {
if (this.$route.meta.internalOrExternal !== undefined && this.$route.meta.internalOrExternal === true) {
this.closeCurrent()
window.open(this.url)
}