fix: clean up code formatting and adjust user model is_active field to null
This commit is contained in:
parent
83a53e61b6
commit
9f31832b4d
@ -9,9 +9,9 @@
|
||||
class="mr-8"
|
||||
style="background: none"
|
||||
>
|
||||
<img :src="chatUser.chat_profile?.icon" alt="" />
|
||||
<img :src="chatUser.chat_profile?.icon" alt=""/>
|
||||
</el-avatar>
|
||||
<LogoIcon v-else height="32px" class="mr-8" />
|
||||
<LogoIcon v-else height="32px" class="mr-8"/>
|
||||
<h1>{{ chatUser.chat_profile?.application_name }}</h1>
|
||||
</div>
|
||||
<!-- 移动端头部标题-->
|
||||
@ -25,9 +25,9 @@
|
||||
:size="32"
|
||||
style="background: none"
|
||||
>
|
||||
<img :src="chatUser.chat_profile?.icon" alt="" />
|
||||
<img :src="chatUser.chat_profile?.icon" alt=""/>
|
||||
</el-avatar>
|
||||
<LogoIcon v-else height="32px" />
|
||||
<LogoIcon v-else height="32px"/>
|
||||
</div>
|
||||
|
||||
<h4
|
||||
@ -118,7 +118,7 @@
|
||||
</el-button>
|
||||
</div>
|
||||
<div v-if="showQrCodeTab">
|
||||
<QrCodeTab :tabs="orgOptions" />
|
||||
<QrCodeTab :tabs="orgOptions"/>
|
||||
</div>
|
||||
<div class="login-gradient-divider lighter mt-24" v-if="modeList.length > 1">
|
||||
<span>{{ $t('views.login.moreMethod') }}</span>
|
||||
@ -137,7 +137,7 @@
|
||||
'font-size': item === 'OAUTH2' ? '8px' : '10px',
|
||||
color: theme.themeInfo?.theme,
|
||||
}"
|
||||
>{{ item }}</span
|
||||
>{{ item }}</span
|
||||
>
|
||||
</el-button>
|
||||
<el-button
|
||||
@ -147,7 +147,7 @@
|
||||
class="login-button-circle color-secondary"
|
||||
@click="changeMode('QR_CODE')"
|
||||
>
|
||||
<img src="@/assets/icon_qr_outlined.svg" width="25px" />
|
||||
<img src="@/assets/icon_qr_outlined.svg" width="25px"/>
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="item === 'LOCAL' && loginMode != 'LOCAL'"
|
||||
@ -165,31 +165,32 @@
|
||||
</UserLoginLayout>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, onBeforeMount, computed } from 'vue'
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import type { FormInstance, FormRules } from 'element-plus'
|
||||
import type { LoginRequest } from '@/api/type/login'
|
||||
import {onMounted, ref, onBeforeMount, computed} from 'vue'
|
||||
import {useRoute, useRouter} from 'vue-router'
|
||||
import type {FormInstance, FormRules} from 'element-plus'
|
||||
import type {LoginRequest} from '@/api/type/login'
|
||||
import UserLoginLayout from '@/layout/login-layout/UserLoginLayout.vue'
|
||||
import loginApi from '@/api/chat/chat.ts'
|
||||
import { t } from '@/locales'
|
||||
import {t} from '@/locales'
|
||||
import useResize from '@/layout/hooks/useResize'
|
||||
import useStore from '@/stores'
|
||||
import { useI18n } from 'vue-i18n'
|
||||
import {useI18n} from 'vue-i18n'
|
||||
import QrCodeTab from '@/views/chat/user-login/scanCompinents/QrCodeTab.vue'
|
||||
import { MsgConfirm, MsgError } from '@/utils/message.ts'
|
||||
import {MsgConfirm, MsgError} from '@/utils/message.ts'
|
||||
import PasswordAuth from '@/views/chat/auth/component/password.vue'
|
||||
import { isAppIcon } from '@/utils/common'
|
||||
import {isAppIcon} from '@/utils/common'
|
||||
|
||||
useResize()
|
||||
const router = useRouter()
|
||||
|
||||
const { theme, chatUser, common } = useStore()
|
||||
const { locale } = useI18n({ useScope: 'global' })
|
||||
const {theme, chatUser, common} = useStore()
|
||||
const {locale} = useI18n({useScope: 'global'})
|
||||
const loading = ref<boolean>(false)
|
||||
const route = useRoute()
|
||||
const identifyCode = ref<string>('')
|
||||
const {
|
||||
params: { accessToken },
|
||||
query: { mode },
|
||||
params: {accessToken},
|
||||
query: {mode},
|
||||
} = route as any
|
||||
|
||||
const isPc = computed(() => {
|
||||
@ -241,7 +242,7 @@ const loginHandle = () => {
|
||||
chatUser.ldapLogin(loginForm.value).then((ok) => {
|
||||
router.push({
|
||||
name: 'chat',
|
||||
params: { accessToken: chatUser.accessToken },
|
||||
params: {accessToken: chatUser.accessToken},
|
||||
query: route.query,
|
||||
})
|
||||
})
|
||||
@ -249,7 +250,7 @@ const loginHandle = () => {
|
||||
chatUser.login(loginForm.value).then((ok) => {
|
||||
router.push({
|
||||
name: 'chat',
|
||||
params: { accessToken: chatUser.accessToken },
|
||||
params: {accessToken: chatUser.accessToken},
|
||||
query: route.query,
|
||||
})
|
||||
})
|
||||
@ -330,7 +331,8 @@ function redirectAuth(authType: string, needMessage: boolean = false) {
|
||||
.then(() => {
|
||||
window.location.href = url
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => {
|
||||
})
|
||||
} else {
|
||||
console.log('url', url)
|
||||
window.location.href = url
|
||||
@ -378,7 +380,7 @@ onBeforeMount(() => {
|
||||
// modeList需要去掉lark wecom dingtalk
|
||||
modeList.value = modeList.value.filter((item) => !['lark', 'wecom', 'dingtalk'].includes(item))
|
||||
if (QrList.value.length > 0) {
|
||||
modeList.value.push('QR_CODE')
|
||||
modeList.value = ['QR_CODE', ...modeList.value]
|
||||
QrList.value.forEach((item) => {
|
||||
orgOptions.value.push({
|
||||
key: item,
|
||||
@ -409,12 +411,15 @@ onBeforeMount(() => {
|
||||
border-bottom: 1px solid var(--el-border-color);
|
||||
}
|
||||
}
|
||||
|
||||
.user-login-container {
|
||||
width: 480px;
|
||||
|
||||
.login-card {
|
||||
padding: 18px;
|
||||
}
|
||||
}
|
||||
|
||||
.login-gradient-divider {
|
||||
position: relative;
|
||||
text-align: center;
|
||||
|
||||
@ -312,7 +312,7 @@ const search_form = ref<{
|
||||
username: '',
|
||||
nick_name: '',
|
||||
email: '',
|
||||
is_active: true,
|
||||
is_active: null,
|
||||
source: '',
|
||||
})
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user