Commit a8f1735dff29503597279a5ea647888c1e1d58ed

Authored by 杨泽宇
1 parent 34615b13

debug

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
... ... @@ -99,7 +99,7 @@ const handleProxy = (obj) =&gt; {
99 99 getMenu().then(() => {
100 100 console.log("got menu data");
101 101 setTimeout(() => {
102   - // location.href = '/'
  102 + location.href = '/'
103 103 console.log("跳");
104 104 }, 2000);
105 105 });
... ...