提交 41b76014 作者: 毛细亚

新增 debug 模式

上级 40b29fd3
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>company_app</title><script src="https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"></script><script defer="defer" src="static/js/chunk-vendors.6db6cb17.js"></script><script defer="defer" src="static/js/app.7d43d61c.js"></script><link href="static/css/chunk-vendors.34a02360.css" rel="stylesheet"><link href="static/css/app.c6113497.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but company_app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
\ No newline at end of file
<!doctype html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>company_app</title><script src="https://g.alicdn.com/dingding/dinglogin/0.0.5/ddLogin.js"></script><script defer="defer" src="static/js/chunk-vendors.037127e5.js"></script><script defer="defer" src="static/js/app.64e538d9.js"></script><link href="static/css/chunk-vendors.34a02360.css" rel="stylesheet"><link href="static/css/app.fd5bb7fb.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but company_app doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div></body></html>
\ No newline at end of file
<template>
<div id="app" class="mobile-app-wrapper">
<Debug />
<div class="mobile-menu-bar" v-if="token && external_userid && showMemberId">
<!-- 临时调试信息 -->
<el-menu :default-active="selectedPath" mode="horizontal" class="mobile-el-menu" background-color="#fff" router
......@@ -23,10 +23,12 @@ import { getToken } from '@/utils/auth'
import { mapState, mapMutations } from 'vuex'
import Cookies from 'js-cookie'
import { getParams } from '@/utils/index'
import Debug from '@/components/debug.vue'
export default {
name: 'App',
components: {
bindUserList
bindUserList,
Debug
},
data() {
return {
......
<template>
<!-- 开发模式触发区域 - 隐藏的点击区域 -->
<div class="dev-mode-trigger" @click="handleDevModeClick" title="开发模式触发区域"></div>
</template>
<script>
import devModeManager from '@/utils/devMode'
export default {
name: 'Debug',
methods: {
handleDevModeClick() {
devModeManager.handleClick()
}
}
}
</script>
<style lang="scss" scoped>
/* 开发模式触发区域 */
.dev-mode-trigger {
position: absolute;
top: 5px;
left: 5px;
width: 50px;
height: 50px;
background: transparent;
cursor: pointer;
z-index: 999;
user-select: none;
}
/* 开发环境下显示边框提示 */
.dev-mode-trigger:hover {
background: rgba(0, 191, 138, 0.1);
border-radius: 4px;
}
</style>
\ No newline at end of file
......@@ -96,11 +96,11 @@ router.beforeEach((to, from, next) => {
} else {
// 缺少登录信息,跳转到登录页
// 跳转到 login 的时候带上当前 url 的参数
// next({
// path: '/login',
// query: urlParams
// })
next()
next({
path: '/login',
query: urlParams
})
// next()
}
} else {
// 登录页、回调页等不需要校验
......
......@@ -18,8 +18,6 @@
</div>
</div>
</div>
<!-- 开发模式触发区域 - 隐藏的点击区域 -->
<div class="dev-mode-trigger" @click="handleDevModeClick" title="开发模式触发区域"></div>
<!-- 组织切换弹窗 -->
<el-dialog :visible.sync="showOrgDialog" width="300px" title="选择组织">
<ul style="list-style:none;padding:0;margin-top: -20px;">
......@@ -49,7 +47,6 @@ import { getParams } from '@/utils/index'
import { mapMutations, mapState } from 'vuex'
import { getToken, setToken } from '@/utils/auth'
import jsApiList from '@/utils/jsApiList'
import devModeManager from '@/utils/devMode'
export default {
data() {
return {
......@@ -102,11 +99,6 @@ export default {
}
},
// 处理开发模式点击
handleDevModeClick() {
devModeManager.handleClick()
},
// 设置缓存
cacheCorp_id(corp_id) {
Cookies.set('corp_id', corp_id, { expires: 7 })
......@@ -349,26 +341,6 @@ export default {
align-items: center;
justify-content: center;
}
/* 开发模式触发区域 */
.dev-mode-trigger {
position: absolute;
top: 5px;
right: 5px;
width: 50px;
height: 50px;
background: transparent;
cursor: pointer;
z-index: 999;
user-select: none;
}
/* 开发环境下显示边框提示 */
.dev-mode-trigger:hover {
background: rgba(0, 191, 138, 0.1);
border-radius: 4px;
}
.qr-contain {
margin: 0 auto;
/* margin-top: 20px; */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论