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,9 +7,11 @@ interface LoginUser { | ||
| 7 | id?: number, | 7 | id?: number, |
| 8 | userName: string, | 8 | userName: string, |
| 9 | organizationType?: number | null, | 9 | organizationType?: number | null, |
| 10 | - organizationName: string, | ||
| 11 | - organizationLogo: string, | 10 | + organizationName?: string, |
| 11 | + organizationLogo?: string, | ||
| 12 | oId?: number, | 12 | oId?: number, |
| 13 | + oName?: string, | ||
| 14 | + oLogo?: string, | ||
| 13 | userId?: number, | 15 | userId?: number, |
| 14 | oType?: number | 16 | oType?: number |
| 15 | } | 17 | } |
| @@ -59,9 +61,9 @@ const actions = { | @@ -59,9 +61,9 @@ const actions = { | ||
| 59 | this.organizationId = obj.organizationId? obj.organizationId: obj.oId | 61 | this.organizationId = obj.organizationId? obj.organizationId: obj.oId |
| 60 | this.id = obj.id? obj.id: obj.userId | 62 | this.id = obj.id? obj.id: obj.userId |
| 61 | this.userName = obj.userName | 63 | this.userName = obj.userName |
| 62 | - this.organizationName = obj.organizationName | 64 | + this.organizationName = obj.organizationName? obj.organizationName: obj.oName |
| 63 | this.organizationType = obj.organizationType? obj.organizationType: obj.oType | 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 | removeToken(msg: string | null) { | 68 | removeToken(msg: string | null) { |
| 67 | logout() | 69 | logout() |
src/views/dashboard/index.vue
| @@ -17,10 +17,11 @@ console.log(router.getRoutes()); | @@ -17,10 +17,11 @@ console.log(router.getRoutes()); | ||
| 17 | <template> | 17 | <template> |
| 18 | <div class="dashboard-container"> | 18 | <div class="dashboard-container"> |
| 19 | <div class="dashboard-logo"></div> | 19 | <div class="dashboard-logo"></div> |
| 20 | - <h1>欢迎访问 -- {{ title }}</h1> | 20 | + <h1>欢迎访问 -- {{ store.family.loginStore().organizationName? store.family.loginStore().organizationName: title }}</h1> |
| 21 | <!-- {{ store.family }} | 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 | </div> | 25 | </div> |
| 25 | </template> | 26 | </template> |
| 26 | 27 |
src/views/property/index.vue
| @@ -99,7 +99,7 @@ const handleProxy = (obj) => { | @@ -99,7 +99,7 @@ const handleProxy = (obj) => { | ||
| 99 | getMenu().then(() => { | 99 | getMenu().then(() => { |
| 100 | console.log("got menu data"); | 100 | console.log("got menu data"); |
| 101 | setTimeout(() => { | 101 | setTimeout(() => { |
| 102 | - // location.href = '/' | 102 | + location.href = '/' |
| 103 | console.log("跳"); | 103 | console.log("跳"); |
| 104 | }, 2000); | 104 | }, 2000); |
| 105 | }); | 105 | }); |