路由
This commit is contained in:
43
index.html
43
index.html
@@ -3,51 +3,8 @@
|
|||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0,user-scalable=no">
|
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0,user-scalable=no">
|
||||||
<title>apt-nl</title>
|
<title>apt-nl</title>
|
||||||
<script src="../../common/js/appmui.js"></script>
|
|
||||||
<!-- <script src="https://cdn.bootcss.com/vConsole/3.3.4/vconsole.min.js"></script> -->
|
|
||||||
<!-- <script>
|
|
||||||
// 初始化
|
|
||||||
var vConsole = new VConsole();
|
|
||||||
console.log('Hello world');
|
|
||||||
</script> -->
|
|
||||||
<!-- <script src="http://192.168.81.82:8000/CLodopfuncs.js" id='printid'></script> -->
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
</body>
|
</body>
|
||||||
<script type="text/javascript">
|
|
||||||
var event = document.createEvent('HTMLEvents');
|
|
||||||
event.initEvent('qrcodeEvent', false, true);
|
|
||||||
//提供给Android调用的方法
|
|
||||||
function qrcodeCallback(result){
|
|
||||||
// alert(JSON.stringify(result))
|
|
||||||
event.data = {lxqrcode: result};
|
|
||||||
window.dispatchEvent(event);
|
|
||||||
}
|
|
||||||
// function barcodeCallback(result){
|
|
||||||
// window.lxqrcode = result
|
|
||||||
// // event.data = {lxqrcode: result};
|
|
||||||
// // window.dispatchEvent(event);
|
|
||||||
// }
|
|
||||||
// function imgUploadCallback(result){
|
|
||||||
// window.upimgres = result
|
|
||||||
// }
|
|
||||||
// window.onload=function(){
|
|
||||||
// document.onkeydown=function(ev){
|
|
||||||
// var event=ev ||event
|
|
||||||
// if(event.keyCode==13){
|
|
||||||
// imgUploadCallback('{"code":"1","desc":"上传成功","fileid":"6042511C35AF4B258045196D19DF9CA0"}')
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// enter键测试调用扫码函数
|
|
||||||
// window.onload=function(){
|
|
||||||
// document.onkeydown=function(ev){
|
|
||||||
// var event=ev ||event
|
|
||||||
// if(event.keyCode==13){
|
|
||||||
// barcodeCallback('04#T0001')
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
</script>
|
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ const messages = {
|
|||||||
zh: Object.assign(zh, zhLocale)
|
zh: Object.assign(zh, zhLocale)
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(messages.zh)
|
// console.log(messages.zh)
|
||||||
|
|
||||||
const i18n = new VueI18n({
|
const i18n = new VueI18n({
|
||||||
locale: localStorage.getItem('locale') || 'zh',
|
locale: localStorage.getItem('locale') || 'zh',
|
||||||
|
|||||||
@@ -116,13 +116,9 @@ export default {
|
|||||||
label: '示教',
|
label: '示教',
|
||||||
index: '5',
|
index: '5',
|
||||||
router: '/teach'
|
router: '/teach'
|
||||||
}, {
|
|
||||||
label: '地图',
|
|
||||||
index: '6',
|
|
||||||
router: ''
|
|
||||||
}, {
|
}, {
|
||||||
label: '系统管理',
|
label: '系统管理',
|
||||||
index: '7',
|
index: '6',
|
||||||
router: '/user'
|
router: '/user'
|
||||||
}],
|
}],
|
||||||
dropdown: false,
|
dropdown: false,
|
||||||
@@ -132,6 +128,16 @@ export default {
|
|||||||
unclick: false
|
unclick: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
beforeRouteEnter (to, from, next) {
|
||||||
|
next(vm => {
|
||||||
|
vm.menus.map(el => {
|
||||||
|
if (el.router === vm.$route.path) {
|
||||||
|
vm.activeIndex = el.index
|
||||||
|
vm.$store.dispatch('getDefaultActive', el.index)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
oldpassword (val) {
|
oldpassword (val) {
|
||||||
if (val === '' || this.newpassword1 === '' || this.newpassword2 === '') {
|
if (val === '' || this.newpassword1 === '' || this.newpassword2 === '') {
|
||||||
|
|||||||
Reference in New Issue
Block a user