Skip to content

Commit 4820df8

Browse files
committed
优化路由表
1 parent b51a151 commit 4820df8

File tree

5 files changed

+24
-16
lines changed

5 files changed

+24
-16
lines changed

src/icons/svg/talk.svg

Lines changed: 1 addition & 0 deletions
Loading

src/icons/svg/talk2.svg

Lines changed: 1 addition & 0 deletions
Loading

src/router/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,13 @@ export const asyncRouterMap = [
5454
{ path: 'book', name: 'book', component: _import('DouBan/book'),meta:{title:"热门书籍"}}]
5555
},
5656
{
57-
path: '/KaoQin',
57+
path: '/People',
5858
component: Layout,
59-
redirect: '/KaoQin/person',
59+
redirect: '/People/person',
6060
name:"person",
6161
title:"人员信息",
6262
icon:'zonghe',
63-
children: [{ path: 'person', name: 'person', component: _import('KaoQin/person'),meta:{title:"人员信息录入"}}]
63+
children: [{ path: 'person', name: 'person1', component: _import('KaoQin/person'),meta:{title:"人员信息录入"}}]
6464
},
6565
{
6666
path: '/KaoQin',

src/views/dashboard/index.vue

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export default {
8989
music: null,
9090
request: "",
9191
msg: "",
92-
history:[]
92+
history: []
9393
};
9494
},
9595
name: "dashboard",
@@ -109,19 +109,19 @@ export default {
109109
}, 1000);
110110
},
111111
chat() {
112-
this.history.push(this.request);
112+
this.history.push(this.request);
113113
axios
114114
.post("/Chat", {
115115
key: "050b4fa163454f13bf3372cb1715f5d4",
116116
info: this.request,
117117
userid: "a123456"
118118
})
119-
.then(response=>{
120-
console.log(response)
121-
this.request="";
119+
.then(response => {
120+
console.log(response);
121+
this.request = "";
122122
this.history.push(response.data.text);
123123
})
124-
.catch(error=> {
124+
.catch(error => {
125125
console.log(error);
126126
});
127127
},
@@ -140,7 +140,18 @@ export default {
140140
created() {
141141
this.GetNowTime();
142142
this.GetReport();
143+
console.log("created!")
143144
// this.GetMusic()
145+
},
146+
beforeCreate(){
147+
console.log("beforeCreate")
148+
},
149+
150+
mounted(){
151+
console.log("mounted!")
152+
},
153+
beforeMount(){
154+
console.log("beforemounted")
144155
}
145156
};
146157
</script>

src/views/layout/Layout.vue

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<sidebar class="sidebar-container"></sidebar>
55
</div>
66
<div class="main-container">
7-
<navbar @Send="get"></navbar>
7+
<navbar></navbar>
88
<TagsView></TagsView>
99
<app-main></app-main>
1010
</div>
@@ -45,12 +45,7 @@
4545
message: this.$store.getters.name
4646
});
4747
},
48-
methods:{
49-
get(msg){
50-
alert(msg);
51-
52-
}
53-
}
48+
5449
}
5550
5651
</script>

0 commit comments

Comments
 (0)