|
9 | 9 | class="mr-8" |
10 | 10 | style="background: none" |
11 | 11 | > |
12 | | - <img :src="chatUser.chat_profile?.icon" alt="" /> |
| 12 | + <img :src="chatUser.chat_profile?.icon" alt=""/> |
13 | 13 | </el-avatar> |
14 | | - <LogoIcon v-else height="32px" class="mr-8" /> |
| 14 | + <LogoIcon v-else height="32px" class="mr-8"/> |
15 | 15 | <h1>{{ chatUser.chat_profile?.application_name }}</h1> |
16 | 16 | </div> |
17 | 17 | <!-- 移动端头部标题--> |
|
25 | 25 | :size="32" |
26 | 26 | style="background: none" |
27 | 27 | > |
28 | | - <img :src="chatUser.chat_profile?.icon" alt="" /> |
| 28 | + <img :src="chatUser.chat_profile?.icon" alt=""/> |
29 | 29 | </el-avatar> |
30 | | - <LogoIcon v-else height="32px" /> |
| 30 | + <LogoIcon v-else height="32px"/> |
31 | 31 | </div> |
32 | 32 |
|
33 | 33 | <h4 |
|
118 | 118 | </el-button> |
119 | 119 | </div> |
120 | 120 | <div v-if="showQrCodeTab"> |
121 | | - <QrCodeTab :tabs="orgOptions" /> |
| 121 | + <QrCodeTab :tabs="orgOptions"/> |
122 | 122 | </div> |
123 | 123 | <div class="login-gradient-divider lighter mt-24" v-if="modeList.length > 1"> |
124 | 124 | <span>{{ $t('views.login.moreMethod') }}</span> |
|
137 | 137 | 'font-size': item === 'OAUTH2' ? '8px' : '10px', |
138 | 138 | color: theme.themeInfo?.theme, |
139 | 139 | }" |
140 | | - >{{ item }}</span |
| 140 | + >{{ item }}</span |
141 | 141 | > |
142 | 142 | </el-button> |
143 | 143 | <el-button |
|
147 | 147 | class="login-button-circle color-secondary" |
148 | 148 | @click="changeMode('QR_CODE')" |
149 | 149 | > |
150 | | - <img src="@/assets/icon_qr_outlined.svg" width="25px" /> |
| 150 | + <img src="@/assets/icon_qr_outlined.svg" width="25px"/> |
151 | 151 | </el-button> |
152 | 152 | <el-button |
153 | 153 | v-if="item === 'LOCAL' && loginMode != 'LOCAL'" |
|
165 | 165 | </UserLoginLayout> |
166 | 166 | </template> |
167 | 167 | <script setup lang="ts"> |
168 | | -import { onMounted, ref, onBeforeMount, computed } from 'vue' |
169 | | -import { useRoute, useRouter } from 'vue-router' |
170 | | -import type { FormInstance, FormRules } from 'element-plus' |
171 | | -import type { LoginRequest } from '@/api/type/login' |
| 168 | +import {onMounted, ref, onBeforeMount, computed} from 'vue' |
| 169 | +import {useRoute, useRouter} from 'vue-router' |
| 170 | +import type {FormInstance, FormRules} from 'element-plus' |
| 171 | +import type {LoginRequest} from '@/api/type/login' |
172 | 172 | import UserLoginLayout from '@/layout/login-layout/UserLoginLayout.vue' |
173 | 173 | import loginApi from '@/api/chat/chat.ts' |
174 | | -import { t } from '@/locales' |
| 174 | +import {t} from '@/locales' |
175 | 175 | import useResize from '@/layout/hooks/useResize' |
176 | 176 | import useStore from '@/stores' |
177 | | -import { useI18n } from 'vue-i18n' |
| 177 | +import {useI18n} from 'vue-i18n' |
178 | 178 | import QrCodeTab from '@/views/chat/user-login/scanCompinents/QrCodeTab.vue' |
179 | | -import { MsgConfirm, MsgError } from '@/utils/message.ts' |
| 179 | +import {MsgConfirm, MsgError} from '@/utils/message.ts' |
180 | 180 | import PasswordAuth from '@/views/chat/auth/component/password.vue' |
181 | | -import { isAppIcon } from '@/utils/common' |
| 181 | +import {isAppIcon} from '@/utils/common' |
| 182 | +
|
182 | 183 | useResize() |
183 | 184 | const router = useRouter() |
184 | 185 |
|
185 | | -const { theme, chatUser, common } = useStore() |
186 | | -const { locale } = useI18n({ useScope: 'global' }) |
| 186 | +const {theme, chatUser, common} = useStore() |
| 187 | +const {locale} = useI18n({useScope: 'global'}) |
187 | 188 | const loading = ref<boolean>(false) |
188 | 189 | const route = useRoute() |
189 | 190 | const identifyCode = ref<string>('') |
190 | 191 | const { |
191 | | - params: { accessToken }, |
192 | | - query: { mode }, |
| 192 | + params: {accessToken}, |
| 193 | + query: {mode}, |
193 | 194 | } = route as any |
194 | 195 |
|
195 | 196 | const isPc = computed(() => { |
@@ -241,15 +242,15 @@ const loginHandle = () => { |
241 | 242 | chatUser.ldapLogin(loginForm.value).then((ok) => { |
242 | 243 | router.push({ |
243 | 244 | name: 'chat', |
244 | | - params: { accessToken: chatUser.accessToken }, |
| 245 | + params: {accessToken: chatUser.accessToken}, |
245 | 246 | query: route.query, |
246 | 247 | }) |
247 | 248 | }) |
248 | 249 | } else { |
249 | 250 | chatUser.login(loginForm.value).then((ok) => { |
250 | 251 | router.push({ |
251 | 252 | name: 'chat', |
252 | | - params: { accessToken: chatUser.accessToken }, |
| 253 | + params: {accessToken: chatUser.accessToken}, |
253 | 254 | query: route.query, |
254 | 255 | }) |
255 | 256 | }) |
@@ -330,7 +331,8 @@ function redirectAuth(authType: string, needMessage: boolean = false) { |
330 | 331 | .then(() => { |
331 | 332 | window.location.href = url |
332 | 333 | }) |
333 | | - .catch(() => {}) |
| 334 | + .catch(() => { |
| 335 | + }) |
334 | 336 | } else { |
335 | 337 | console.log('url', url) |
336 | 338 | window.location.href = url |
@@ -378,7 +380,7 @@ onBeforeMount(() => { |
378 | 380 | // modeList需要去掉lark wecom dingtalk |
379 | 381 | modeList.value = modeList.value.filter((item) => !['lark', 'wecom', 'dingtalk'].includes(item)) |
380 | 382 | if (QrList.value.length > 0) { |
381 | | - modeList.value.push('QR_CODE') |
| 383 | + modeList.value = ['QR_CODE', ...modeList.value] |
382 | 384 | QrList.value.forEach((item) => { |
383 | 385 | orgOptions.value.push({ |
384 | 386 | key: item, |
@@ -409,12 +411,15 @@ onBeforeMount(() => { |
409 | 411 | border-bottom: 1px solid var(--el-border-color); |
410 | 412 | } |
411 | 413 | } |
| 414 | +
|
412 | 415 | .user-login-container { |
413 | 416 | width: 480px; |
| 417 | +
|
414 | 418 | .login-card { |
415 | 419 | padding: 18px; |
416 | 420 | } |
417 | 421 | } |
| 422 | +
|
418 | 423 | .login-gradient-divider { |
419 | 424 | position: relative; |
420 | 425 | text-align: center; |
|
0 commit comments