|
@@ -20,7 +20,11 @@ |
|
@@ -20,7 +20,11 @@ |
20
|
<div class="hidden min-h-full pl-4 mr-4 xl:flex xl:flex-col xl:w-6/12">
|
20
|
<div class="hidden min-h-full pl-4 mr-4 xl:flex xl:flex-col xl:w-6/12">
|
21
|
<!-- <AppLogo class="-enter-x" /> -->
|
21
|
<!-- <AppLogo class="-enter-x" /> -->
|
22
|
<div style="display: flex; margin-top: 10px">
|
22
|
<div style="display: flex; margin-top: 10px">
|
23
|
- <img v-if="getLogo" :src="getLogo" style="width: 48px; height: 48px" />
|
23
|
+ <img
|
|
|
24
|
+ v-if="defaultLogo || getLogo"
|
|
|
25
|
+ :src="defaultLogo || getLogo"
|
|
|
26
|
+ style="width: 48px; height: 48px"
|
|
|
27
|
+ />
|
24
|
<img style="width: 48px; height: 48px" v-else src="/src/assets/images/logo.png" />
|
28
|
<img style="width: 48px; height: 48px" v-else src="/src/assets/images/logo.png" />
|
25
|
<div
|
29
|
<div
|
26
|
class="ml-2 truncate md:opacity-100"
|
30
|
class="ml-2 truncate md:opacity-100"
|
|
@@ -32,7 +36,7 @@ |
|
@@ -32,7 +36,7 @@ |
32
|
font-weight: 700;
|
36
|
font-weight: 700;
|
33
|
"
|
37
|
"
|
34
|
>
|
38
|
>
|
35
|
- {{ getTitle }}
|
39
|
+ {{ defaultTitle || getTitle }}
|
36
|
</div>
|
40
|
</div>
|
37
|
</div>
|
41
|
</div>
|
38
|
<div v-if="ifCustom" class="my-auto">
|
42
|
<div v-if="ifCustom" class="my-auto">
|
|
@@ -65,7 +69,7 @@ |
|
@@ -65,7 +69,7 @@ |
65
|
</div>
|
69
|
</div>
|
66
|
</template>
|
70
|
</template>
|
67
|
<script lang="ts" setup>
|
71
|
<script lang="ts" setup>
|
68
|
- import { computed, ref } from 'vue';
|
72
|
+ import { computed, ref, onMounted } from 'vue';
|
69
|
// import { AppLogo } from '/@/components/Application';
|
73
|
// import { AppLogo } from '/@/components/Application';
|
70
|
import { AppLocalePicker, AppDarkModeToggle } from '/@/components/Application';
|
74
|
import { AppLocalePicker, AppDarkModeToggle } from '/@/components/Application';
|
71
|
import LoginForm from './LoginForm.vue';
|
75
|
import LoginForm from './LoginForm.vue';
|
|
@@ -77,16 +81,31 @@ |
|
@@ -77,16 +81,31 @@ |
77
|
import { useDesign } from '/@/hooks/web/useDesign';
|
81
|
import { useDesign } from '/@/hooks/web/useDesign';
|
78
|
import { useLocaleStore } from '/@/store/modules/locale';
|
82
|
import { useLocaleStore } from '/@/store/modules/locale';
|
79
|
import { useUserStore } from '/@/store/modules/user';
|
83
|
import { useUserStore } from '/@/store/modules/user';
|
|
|
84
|
+ import { getPlatForm } from '/@/api/oem/index';
|
80
|
|
85
|
|
81
|
defineProps({
|
86
|
defineProps({
|
82
|
sessionTimeout: {
|
87
|
sessionTimeout: {
|
83
|
type: Boolean,
|
88
|
type: Boolean,
|
84
|
},
|
89
|
},
|
85
|
});
|
90
|
});
|
|
|
91
|
+ const defaultTitle = ref('');
|
|
|
92
|
+ const defaultLogo = ref('');
|
|
|
93
|
+ const logoUrl = ref('');
|
|
|
94
|
+ onMounted(async () => {
|
|
|
95
|
+ const res = await getPlatForm();
|
|
|
96
|
+ logoUrl.value = res?.background;
|
|
|
97
|
+ defaultTitle.value = res?.name;
|
|
|
98
|
+ defaultLogo.value = res?.logo;
|
|
|
99
|
+ if (logoUrl.value !== undefined) {
|
|
|
100
|
+ ifCustom.value = false;
|
|
|
101
|
+ } else {
|
|
|
102
|
+ const defaultLogo = 'src/assets/svg/login-bg.svg';
|
|
|
103
|
+ logoUrl.value = 'url(' + defaultLogo + ')';
|
|
|
104
|
+ }
|
|
|
105
|
+ });
|
86
|
|
106
|
|
87
|
const userStore = useUserStore();
|
107
|
const userStore = useUserStore();
|
88
|
|
108
|
|
89
|
- const logoUrl = ref('');
|
|
|
90
|
const ifCustom = ref(true);
|
109
|
const ifCustom = ref(true);
|
91
|
const getLogo = computed(() => {
|
110
|
const getLogo = computed(() => {
|
92
|
return userStore.platInfo?.logo;
|
111
|
return userStore.platInfo?.logo;
|