diff --git a/src/App.vue b/src/App.vue index 883bef3..2b7f52d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -111,6 +111,7 @@ import {getData} from './api/index.js' this.fun(); }, mounted() { + window.goPage = this.goPage() this.menuChange(0,this.menuBtn[0].name) let week = new Date(this.$moment().format("YYYY-MM-DD")).getDay() this.week = this.weekList[week] @@ -132,7 +133,7 @@ import {getData} from './api/index.js' methods:{ //菜单选中 menuChange(index,name){ - console.log("name",name) + this.goPage(name) this.menuAc = index this.menuBtn.forEach((item,index) => { if (index == 0) { @@ -169,6 +170,10 @@ import {getData} from './api/index.js' this.$router.push('alarm') } }, + goPage(name){ + console.log(name) + }, + //选中楼层 floorChange(index){ this.floorAct = index