Commit a8f1735dff29503597279a5ea647888c1e1d58ed
1 parent
34615b13
debug
Showing
3 changed files
with
11 additions
and
8 deletions
src/pinia/modules/login.ts
| ... | ... | @@ -7,9 +7,11 @@ interface LoginUser { |
| 7 | 7 | id?: number, |
| 8 | 8 | userName: string, |
| 9 | 9 | organizationType?: number | null, |
| 10 | - organizationName: string, | |
| 11 | - organizationLogo: string, | |
| 10 | + organizationName?: string, | |
| 11 | + organizationLogo?: string, | |
| 12 | 12 | oId?: number, |
| 13 | + oName?: string, | |
| 14 | + oLogo?: string, | |
| 13 | 15 | userId?: number, |
| 14 | 16 | oType?: number |
| 15 | 17 | } |
| ... | ... | @@ -59,9 +61,9 @@ const actions = { |
| 59 | 61 | this.organizationId = obj.organizationId? obj.organizationId: obj.oId |
| 60 | 62 | this.id = obj.id? obj.id: obj.userId |
| 61 | 63 | this.userName = obj.userName |
| 62 | - this.organizationName = obj.organizationName | |
| 64 | + this.organizationName = obj.organizationName? obj.organizationName: obj.oName | |
| 63 | 65 | this.organizationType = obj.organizationType? obj.organizationType: obj.oType |
| 64 | - this.organizationLogo = obj.organizationLogo | |
| 66 | + this.organizationLogo = obj.organizationLogo? obj.organizationLogo: obj.oLogo | |
| 65 | 67 | }, |
| 66 | 68 | removeToken(msg: string | null) { |
| 67 | 69 | logout() | ... | ... |
src/views/dashboard/index.vue
| ... | ... | @@ -17,10 +17,11 @@ console.log(router.getRoutes()); |
| 17 | 17 | <template> |
| 18 | 18 | <div class="dashboard-container"> |
| 19 | 19 | <div class="dashboard-logo"></div> |
| 20 | - <h1>欢迎访问 -- {{ title }}</h1> | |
| 20 | + <h1>欢迎访问 -- {{ store.family.loginStore().organizationName? store.family.loginStore().organizationName: title }}</h1> | |
| 21 | 21 | <!-- {{ store.family }} |
| 22 | - {{ store.family.menuStore() }} | |
| 23 | - {{ store.family.menuStore().menuList }} --> | |
| 22 | + {{ store.family.menuStore() }} --> | |
| 23 | + <!-- {{ store.family.loginStore().organizationName }} | |
| 24 | + {{ store.family.loginStore().oName }} --> | |
| 24 | 25 | </div> |
| 25 | 26 | </template> |
| 26 | 27 | ... | ... |
src/views/property/index.vue