Commit cddbf02c authored by xinzhedeai's avatar xinzhedeai

详情页跳转 返回逻辑处理

parent 53b30b7e
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</div> </div>
<div class="menuInfo"> <div class="menuInfo">
<ul> <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}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
</div> </div>
<div class="menuInfo"> <div class="menuInfo">
<ul> <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}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
</div> </div>
<div class="menuInfo"> <div class="menuInfo">
<ul> <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}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.watersystem.menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj.watersystem.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -83,6 +83,9 @@ var gemhoUtil = { ...@@ -83,6 +83,9 @@ var gemhoUtil = {
location.reload() location.reload()
} }
this.bigScreenDetailMenu = window.location.pathname
localStorage.setItem('bigScreenDetailMenu', this.bigScreenDetailMenu)
if (!token) { if (!token) {
window.open(host + '/#/login', '_self') window.open(host + '/#/login', '_self')
return return
...@@ -100,15 +103,22 @@ var gemhoUtil = { ...@@ -100,15 +103,22 @@ var gemhoUtil = {
} }
}, },
methods: { methods: {
goPrePage(url) { goPrePage() {
// history.back() // 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') window.open('/datav/index.html')
} }
}, },
changeMenu(item) { changeMenu(item) {
localStorage.setItem('bigScreenDetailMenu', item.name) localStorage.setItem('bigScreenDetailMenu', item.url)
localStorage.setItem('bigScreenDetailMenuModel', item.model) localStorage.setItem('bigScreenDetailMenuModel', item.model)
this.bigScreenDetailMenu = item.name this.bigScreenDetailMenu = item.name
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</div> </div>
<div class="menuInfo"> <div class="menuInfo">
<ul> <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}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj.natural.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj[bigScreenDetailMenuModel].menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</div> </div>
<div class="menuInfo"> <div class="menuInfo">
<ul> <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}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -61,7 +61,7 @@ ...@@ -61,7 +61,7 @@
</div> </div>
<div class="menuInfo"> <div class="menuInfo">
<ul> <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}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </ul>
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
<div class="menuInfo"> <div class="menuInfo">
<ul> <ul>
<li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)" <li v-for="(item, index) in menuObj.ecosystem.menuList" @click="changeMenu(item)"
:class="{active: bigScreenDetailMenu===item.name}"> :class="{active: bigScreenDetailMenu===item.url}">
{{item.name}} {{item.name}}
</li> </li>
</ul> </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