Commit cddbf02c authored by xinzhedeai's avatar xinzhedeai

详情页跳转 返回逻辑处理

parent 53b30b7e
......@@ -59,7 +59,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -62,7 +62,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -62,7 +62,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -62,7 +62,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -66,7 +66,7 @@
</div>
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.name}">
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -62,7 +62,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -63,7 +63,7 @@
</div>
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.name}">
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -66,7 +66,7 @@
</div>
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.name}">
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -62,7 +62,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -63,7 +63,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -62,7 +62,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -59,7 +59,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj.watersystem.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -59,7 +59,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -83,6 +83,9 @@ var gemhoUtil = {
location.reload()
}
this.bigScreenDetailMenu = window.location.pathname
localStorage.setItem('bigScreenDetailMenu', this.bigScreenDetailMenu)
if (!token) {
window.open(host + '/#/login', '_self')
return
......@@ -100,15 +103,22 @@ var gemhoUtil = {
}
},
methods: {
goPrePage(url) {
goPrePage() {
// history.back()
if(url === 'emergency'){
const type = localStorage.getItem('bigScreenDetailMenuModel')
if(type === 'emergency'){
window.open('/datav/index.html')
}else if(type === 'natural'){
window.open('/datav/natural.html')
}else if(type === 'watersystem'){
window.open('/datav/watersource.html')
}else if(type === 'ecosystem'){
window.open('/datav/index.html')
}
},
changeMenu(item) {
localStorage.setItem('bigScreenDetailMenu', item.name)
localStorage.setItem('bigScreenDetailMenu', item.url)
localStorage.setItem('bigScreenDetailMenuModel', item.model)
this.bigScreenDetailMenu = item.name
......
......@@ -61,7 +61,7 @@
</div>
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.name}">
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -62,7 +62,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -59,7 +59,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -101,7 +101,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -59,7 +59,7 @@
</div>
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.name}">
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -61,7 +61,7 @@
</div>
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.name}">
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -59,7 +59,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
......@@ -59,7 +59,7 @@
<div class="menuInfo">
<ul>
<li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}">
:class="{active: bigScreenDetailMenu===item.url}">
{{item.name}}
</li>
</ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment