|
@@ -1,15 +1,40 @@
|
1
|
1
|
<template>
|
2
|
|
- <div id="app">
|
|
2
|
+ <div id="app" v-if="showPage">
|
3
|
3
|
<router-view></router-view>
|
4
|
4
|
</div>
|
5
|
5
|
</template>
|
6
|
6
|
|
7
|
7
|
<script>
|
8
|
|
- import '../../common/css/reset.css'
|
|
8
|
+import '../../common/css/reset.css'
|
|
9
|
+import { mapState, createNamespacedHelpers } from 'vuex'
|
|
10
|
+const { mapActions: actions } = createNamespacedHelpers('userCenter')
|
9
|
11
|
|
10
|
12
|
export default {
|
11
|
13
|
name: 'app',
|
12
|
|
- components: {}
|
|
14
|
+ data () {
|
|
15
|
+ return {
|
|
16
|
+ showPage: false
|
|
17
|
+ }
|
|
18
|
+ },
|
|
19
|
+ computed: {
|
|
20
|
+ ...mapState({
|
|
21
|
+ userInfo: x => x.userCenter.userInfo,
|
|
22
|
+ org: x => x.app.orgId
|
|
23
|
+ })
|
|
24
|
+ },
|
|
25
|
+ created () {
|
|
26
|
+ if (location.search && this.toolClass.UrlSearch(location.search).code) {
|
|
27
|
+ this.code = this.toolClass.UrlSearch(location.search).code
|
|
28
|
+ } else {
|
|
29
|
+ this.code = null
|
|
30
|
+ }
|
|
31
|
+ this.getUserInfo({ org: this.org, code: this.code }).then(() => {
|
|
32
|
+ this.showPage = true
|
|
33
|
+ })
|
|
34
|
+ },
|
|
35
|
+ methods: {
|
|
36
|
+ ...actions(['getUserInfo'])
|
|
37
|
+ }
|
13
|
38
|
}
|
14
|
39
|
</script>
|
15
|
40
|
|