From 10a908b077b656a33db1fc288376b4a218da602f Mon Sep 17 00:00:00 2001 From: xuyiming Date: Fri, 12 Jun 2020 11:38:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BD=9C=E5=8F=B0=E6=9C=8D=E5=8A=A1?= =?UTF-8?q?=E7=AE=A1=E7=90=86=E5=92=8C=E5=BA=94=E7=94=A8=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 22 +- src/components/menu.vue | 121 +++-- src/pages/workbench/workPlace.vue | 815 +++++++++++++++--------------- src/store/index.js | 25 +- 4 files changed, 533 insertions(+), 450 deletions(-) diff --git a/src/App.vue b/src/App.vue index cf846fc..4c714ee 100644 --- a/src/App.vue +++ b/src/App.vue @@ -12,8 +12,24 @@ export default { components: { bdMenu, }, - methods: {}, - created() {}, + methods: { + getCurrentUser() { + this.$api.user.getNowUser().then(({ data }) => { + if (data.success == 1) { + console.log("--- user info ---"); + console.log(data.data); + console.log("--- user info ---"); + + this.$store.commit("userInfofun", data.data); + } else { + console.log(data.errMsg); + } + }); + }, + }, + created() { + this.getCurrentUser(); + }, }; @@ -28,4 +44,4 @@ export default { background-color: #f6f7fb; font-size: 14px; } - \ No newline at end of file + diff --git a/src/components/menu.vue b/src/components/menu.vue index 4d2b1ad..5b693d9 100644 --- a/src/components/menu.vue +++ b/src/components/menu.vue @@ -1,7 +1,10 @@