Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
yudao-admin-ui
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
licheng
yudao-admin-ui
Commits
c42f901e
You need to sign in or sign up before continuing.
Commit
c42f901e
authored
Jun 25, 2025
by
licheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: 去除登录页不需要部分
parent
7a38dcab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
101 deletions
+0
-101
LoginForm.vue
src/views/Login/components/LoginForm.vue
+0
-101
No files found.
src/views/Login/components/LoginForm.vue
View file @
c42f901e
...
...
@@ -89,64 +89,6 @@
mode="pop"
@success="handleLogin"
/>
<el-col
:span=
"24"
style=
"padding-right: 10px; padding-left: 10px"
>
<el-form-item>
<el-row
:gutter=
"5"
justify=
"space-between"
style=
"width: 100%"
>
<el-col
:span=
"8"
>
<XButton
:title=
"t('login.btnMobile')"
class=
"w-[100%]"
@
click=
"setLoginState(LoginStateEnum.MOBILE)"
/>
</el-col>
<el-col
:span=
"8"
>
<XButton
:title=
"t('login.btnQRCode')"
class=
"w-[100%]"
@
click=
"setLoginState(LoginStateEnum.QR_CODE)"
/>
</el-col>
<el-col
:span=
"8"
>
<XButton
:title=
"t('login.btnRegister')"
class=
"w-[100%]"
@
click=
"setLoginState(LoginStateEnum.REGISTER)"
/>
</el-col>
</el-row>
</el-form-item>
</el-col>
<el-divider
content-position=
"center"
>
{{
t
(
'login.otherLogin'
)
}}
</el-divider>
<el-col
:span=
"24"
style=
"padding-right: 10px; padding-left: 10px"
>
<el-form-item>
<div
class=
"w-[100%] flex justify-between"
>
<Icon
v-for=
"(item, key) in socialList"
:key=
"key"
:icon=
"item.icon"
:size=
"30"
class=
"anticon cursor-pointer"
color=
"#999"
@
click=
"doSocialLogin(item.type)"
/>
</div>
</el-form-item>
</el-col>
<el-divider
content-position=
"center"
>
萌新必读
</el-divider>
<el-col
:span=
"24"
style=
"padding-right: 10px; padding-left: 10px"
>
<el-form-item>
<div
class=
"w-[100%] flex justify-between"
>
<el-link
href=
"https://doc.iocoder.cn/"
target=
"_blank"
>
📚开发指南
</el-link>
<el-link
href=
"https://doc.iocoder.cn/video/"
target=
"_blank"
>
🔥视频教程
</el-link>
<el-link
href=
"https://www.iocoder.cn/Interview/good-collection/"
target=
"_blank"
>
⚡面试手册
</el-link>
<el-link
href=
"http://static.yudao.iocoder.cn/mp/Aix9975.jpeg"
target=
"_blank"
>
🤝外包咨询
</el-link>
</div>
</el-form-item>
</el-col>
</el-row>
</el-form>
</
template
>
...
...
@@ -165,7 +107,6 @@ import { LoginStateEnum, useFormValid, useLoginState } from './useLogin'
defineOptions
({
name
:
'LoginForm'
})
const
{
t
}
=
useI18n
()
const
message
=
useMessage
()
const
iconHouse
=
useIcon
({
icon
:
'ep:house'
})
const
iconAvatar
=
useIcon
({
icon
:
'ep:avatar'
})
const
iconLock
=
useIcon
({
icon
:
'ep:lock'
})
...
...
@@ -199,13 +140,6 @@ const loginData = reactive({
}
})
const
socialList
=
[
{
icon
:
'ant-design:wechat-filled'
,
type
:
30
},
{
icon
:
'ant-design:dingtalk-circle-filled'
,
type
:
20
},
{
icon
:
'ant-design:github-filled'
,
type
:
0
},
{
icon
:
'ant-design:alipay-circle-filled'
,
type
:
0
}
]
// 获取验证码
const
getCode
=
async
()
=>
{
// 情况一,未开启:则直接登录
...
...
@@ -288,41 +222,6 @@ const handleLogin = async (params: any) => {
}
}
// 社交登录
const
doSocialLogin
=
async
(
type
:
number
)
=>
{
if
(
type
===
0
)
{
message
.
error
(
'此方式未配置'
)
}
else
{
loginLoading
.
value
=
true
if
(
loginData
.
tenantEnable
===
'true'
)
{
// 尝试先通过 tenantName 获取租户
await
getTenantId
()
// 如果获取不到,则需要弹出提示,进行处理
if
(
!
authUtil
.
getTenantId
())
{
try
{
const
data
=
await
message
.
prompt
(
'请输入租户名称'
,
t
(
'common.reminder'
))
if
(
data
?.
action
!==
'confirm'
)
throw
'cancel'
const
res
=
await
LoginApi
.
getTenantIdByName
(
data
.
value
)
authUtil
.
setTenantId
(
res
)
}
catch
(
error
)
{
if
(
error
===
'cancel'
)
return
}
finally
{
loginLoading
.
value
=
false
}
}
}
// 计算 redirectUri
// 注意: type、redirect 需要先 encode 一次,否则钉钉回调会丢失。
// 配合 social-login.vue#getUrlValue() 使用
const
redirectUri
=
location
.
origin
+
'/social-login?'
+
encodeURIComponent
(
`type=
${
type
}
&redirect=
${
redirect
.
value
||
'/'
}
`
)
// 进行跳转
window
.
location
.
href
=
await
LoginApi
.
socialAuthRedirect
(
type
,
encodeURIComponent
(
redirectUri
))
}
}
watch
(
()
=>
currentRoute
.
value
,
(
route
:
RouteLocationNormalizedLoaded
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment