Commit aeda04b1 authored by xinzhedeai's avatar xinzhedeai

add:消费者首页 debug开关

parent b93fcc70
...@@ -172,7 +172,7 @@ ...@@ -172,7 +172,7 @@
<div class="header"> <div class="header">
<!-- <div class="level">安全等级</div> --> <!-- <div class="level">安全等级</div> -->
<div class="title"> <div class="title">
<img src="../image/code/sj.png" alt=""><span>{{merInformation.unitName}}</span> <img src="../image/code/sj.png" alt="" @click="openDebug"><span>{{merInformation.unitName}}</span>
<span class="tag green" v-if="merInformation.safeLevel==0" @click="gotoPage('anquan_level')">安全等级-绿</span> <span class="tag green" v-if="merInformation.safeLevel==0" @click="gotoPage('anquan_level')">安全等级-绿</span>
<span class="tag yellow" v-if="merInformation.safeLevel==1" @click="gotoPage('anquan_level')">安全等级-黄</span> <span class="tag yellow" v-if="merInformation.safeLevel==1" @click="gotoPage('anquan_level')">安全等级-黄</span>
<span class="tag red" v-if="merInformation.safeLevel==2" @click="gotoPage('anquan_level')">安全等级-红</span> <span class="tag red" v-if="merInformation.safeLevel==2" @click="gotoPage('anquan_level')">安全等级-红</span>
......
...@@ -47,6 +47,14 @@ window.addEventListener("load", function () { ...@@ -47,6 +47,14 @@ window.addEventListener("load", function () {
// } // }
// }, // },
methods: { methods: {
openDebug() { // 双击开启debugg模式,再次双击则关闭
console.log('开启关闭debug')
if (localStorage.getItem('debug') == 'Y') {
localStorage.setItem('debug', 'N')
} else {
localStorage.setItem('debug', 'Y')
}
},
gotoPage(stringifyUrl) { gotoPage(stringifyUrl) {
let url = gemhoUtil.setParameter(`src/_${stringifyUrl}.html`) let url = gemhoUtil.setParameter(`src/_${stringifyUrl}.html`)
gemhoUtil.navigatePage(url, '跳转中...') gemhoUtil.navigatePage(url, '跳转中...')
......
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