【modify】使用ESLint格式化代码

This commit is contained in:
zer0Black
2023-03-01 09:33:58 +08:00
parent 694855ae8b
commit 63369b8b87
400 changed files with 42942 additions and 43132 deletions
@@ -5,62 +5,61 @@
</template>
<script>
import Vue from 'vue'
import { ACCESS_TOKEN } from "@/store/mutation-types"
import PageLayout from '../page/PageLayout'
import RouteView from './RouteView'
import Vue from 'vue'
import { ACCESS_TOKEN } from '@/store/mutation-types'
import PageLayout from '../page/PageLayout'
import RouteView from './RouteView'
export default {
name: "IframePageContent",
inject:['closeCurrent'],
data () {
return {
url: "",
id:""
}
},
created () {
export default {
name: 'IframePageContent',
inject: ['closeCurrent'],
data () {
return {
url: '',
id: ''
}
},
created () {
this.goUrl()
},
updated () {
this.goUrl()
},
watch: {
$route (to, from) {
this.goUrl()
},
updated () {
this.goUrl()
},
watch: {
$route(to, from) {
this.goUrl();
}
},
methods: {
goUrl () {
let url = this.$route.meta.url
let id = this.$route.path
this.id = id
//url = "http://www.baidu.com"
console.log("------url------"+url)
if (url !== null && url !== undefined) {
//-----------------------------------------------------------------------------------------
//url支持通过 ${token}方式传递当前登录TOKEN
let tokenStr = "${token}";
if(url.indexOf(tokenStr)!=-1) {
let token = Vue.ls.get(ACCESS_TOKEN);
this.url = url.replace(tokenStr, token);
} else {
this.url = url
}
//-----------------------------------------------------------------------------------------
/*update_begin author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
if(this.$route.meta.internalOrExternal != undefined && this.$route.meta.internalOrExternal==true){
this.closeCurrent();
window.open(this.url);
}
/*update_end author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
}
},
methods: {
goUrl () {
const url = this.$route.meta.url
const id = this.$route.path
this.id = id
// url = "http://www.baidu.com"
console.log('------url------' + url)
if (url !== null && url !== undefined) {
// -----------------------------------------------------------------------------------------
// url支持通过 ${token}方式传递当前登录TOKEN
const tokenStr = '${token}'
if (url.indexOf(tokenStr) != -1) {
const token = Vue.ls.get(ACCESS_TOKEN)
this.url = url.replace(tokenStr, token)
} else {
this.url = url
}
// -----------------------------------------------------------------------------------------
/* update_begin author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
if (this.$route.meta.internalOrExternal != undefined && this.$route.meta.internalOrExternal == true) {
this.closeCurrent()
window.open(this.url)
}
/* update_end author:wuxianquan date:20190908 for:判断打开方式,新窗口打开时this.$route.meta.internalOrExternal==true */
}
}
}
}
</script>
<style>
</style>
</style>