动态修改浏览器标题

Lvtianfang
许宏杰 1 year ago
parent 09a187c084
commit 22a112da32

@ -22,24 +22,8 @@ const router = new Router({ routes })
// 路由拦截 // 路由拦截
// router.beforeEach((to, from, next) => { // router.beforeEach((to, from, next) => {
// let token = localStorage.getItem('mudu_token')
// if (token) {
// next() // next()
// } else {
// if (to.path == '/park') {
// console.log('没有token', token, to)
// const loginFrom = {
// LoginId: '镇领导',
// Password: '123456',
// }
// api.login(loginFrom).then((res) => {
// localStorage.setItem('mudu_token', res.access_token)
// localStorage.setItem('mudu_userInfo', JSON.stringify(res))
// next()
// })
// }
// }
// }) // })
export default router export default router

@ -29,6 +29,7 @@ export default {
} }
}, },
created() { created() {
document.title = this.$route.query.name || '企业' //
let windowBar = document.getElementById('statusBar') let windowBar = document.getElementById('statusBar')
windowBar.style.height = 0 + 'px' windowBar.style.height = 0 + 'px'
}, },

@ -27,6 +27,7 @@ export default {
} }
}, },
created() { created() {
document.title = this.$route.query.name || '工业园' //
let windowBar = document.getElementById('statusBar') let windowBar = document.getElementById('statusBar')
windowBar.style.height = 0 + 'px' windowBar.style.height = 0 + 'px'
}, },

@ -204,15 +204,14 @@ export default {
tabListChange: false, tabListChange: false,
} }
}, },
components: { components: {
statistical, statistical,
enterpriseList, enterpriseList,
}, },
created() { created() {
this.querParams.parkProfileId = this.$route.query.id this.querParams.parkProfileId = this.$route.query.id
// this.headerName = this.$route.query.name
this.loading = Toast.loading('加载中...') this.loading = Toast.loading('加载中...')
this.$nextTick(() => { this.$nextTick(() => {
this.getList() this.getList()
this.initMap() this.initMap()
@ -298,8 +297,8 @@ export default {
this.mapLayer.mapLayer1.clearLayers() // this.mapLayer.mapLayer1.clearLayers() //
this.parkName = name this.parkName = name
let mapObj = mapJson.filter((item) => item.parkName == name) let mapObj = mapJson.filter((item) => item.parkName == name)
console.log(mapObj); console.log(mapObj)
console.log(name); console.log(name)
if (mapObj.length == 0) { if (mapObj.length == 0) {
this.$message.error('暂无该工业园面数据...') this.$message.error('暂无该工业园面数据...')
return return

Loading…
Cancel
Save