Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
a451c0b7
authored
Feb 17, 2024
by
芋道源码
Committed by
Gitee
Feb 17, 2024
Browse files
Options
Browse Files
Download
Plain Diff
!311 修复DocAlert无法配置是否启用的问题
Merge pull request !311 from dhb52/master
parents
6fd88567
e106fb73
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
5 deletions
+9
-5
.env
+3
-0
src/components/DocAlert/index.vue
+1
-1
src/views/Login/SocialLogin.vue
+4
-4
types/env.d.ts
+1
-0
No files found.
.env
View file @
a451c0b7
...
...
@@ -13,5 +13,8 @@ VITE_APP_TENANT_ENABLE=true
# 验证码的开关
VITE_APP_CAPTCHA_ENABLE=true
# 文档地址的开关
VITE_APP_DOCALERT_ENABLE=false
# 百度统计
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
src/components/DocAlert/index.vue
View file @
a451c0b7
...
...
@@ -22,7 +22,7 @@ const goToUrl = () => {
/** 是否开启 */
const
getEnable
=
()
=>
{
return
import
.
meta
.
env
.
VITE_APP_
TENANT_ENABLE
===
'tru
e'
return
import
.
meta
.
env
.
VITE_APP_
DOCALERT_ENABLE
!==
'fals
e'
}
</
script
>
<
style
scoped
>
...
...
src/views/Login/SocialLogin.vue
View file @
a451c0b7
...
...
@@ -193,8 +193,8 @@ const LoginRules = {
}
const
loginData
=
reactive
({
isShowPassword
:
false
,
captchaEnable
:
import
.
meta
.
env
.
VITE_APP_CAPTCHA_ENABLE
,
tenantEnable
:
import
.
meta
.
env
.
VITE_APP_TENANT_ENABLE
,
captchaEnable
:
import
.
meta
.
env
.
VITE_APP_CAPTCHA_ENABLE
!==
'false'
,
tenantEnable
:
import
.
meta
.
env
.
VITE_APP_TENANT_ENABLE
!==
'false'
,
loginForm
:
{
tenantName
:
'芋道源码'
,
username
:
'admin'
,
...
...
@@ -207,7 +207,7 @@ const loginData = reactive({
// 获取验证码
const
getCode
=
async
()
=>
{
// 情况一,未开启:则直接登录
if
(
loginData
.
captchaEnable
===
'false'
)
{
if
(
loginData
.
captchaEnable
)
{
await
handleLogin
({})
}
else
{
// 情况二,已开启:则展示验证码;只有完成验证码的情况,才进行登录
...
...
@@ -217,7 +217,7 @@ const getCode = async () => {
}
//获取租户ID
const
getTenantId
=
async
()
=>
{
if
(
loginData
.
tenantEnable
===
'true'
)
{
if
(
loginData
.
tenantEnable
)
{
const
res
=
await
LoginApi
.
getTenantIdByName
(
loginData
.
loginForm
.
tenantName
)
authUtil
.
setTenantId
(
res
)
}
...
...
types/env.d.ts
View file @
a451c0b7
...
...
@@ -14,6 +14,7 @@ interface ImportMetaEnv {
readonly
VITE_DEV
:
string
readonly
VITE_APP_CAPTCHA_ENABLE
:
string
readonly
VITE_APP_TENANT_ENABLE
:
string
readonly
VITE_APP_DOCALERT_ENABLE
:
string
readonly
VITE_BASE_URL
:
string
readonly
VITE_UPLOAD_URL
:
string
readonly
VITE_API_BASEPATH
:
string
...
...
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