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
Commit
d883b860
authored
May 21, 2024
by
DevDengChao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: 提取默认登录使用的租户与账号密码, 规避潜在的账户泄露问题
parent
be978f2e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
.env
+5
-0
src/views/Login/components/LoginForm.vue
+3
-3
types/env.d.ts
+3
-0
No files found.
.env
View file @
d883b860
...
...
@@ -18,3 +18,8 @@ VITE_APP_DOCALERT_ENABLE=true
# 百度统计
VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
# 默认账户密码
VITE_APP_DEFAULT_LOGIN_TENANT = 芋道源码
VITE_APP_DEFAULT_LOGIN_USERNAME = admin
VITE_APP_DEFAULT_LOGIN_PASSWORD = admin123
src/views/Login/components/LoginForm.vue
View file @
d883b860
...
...
@@ -184,9 +184,9 @@ const loginData = reactive({
captchaEnable
:
import
.
meta
.
env
.
VITE_APP_CAPTCHA_ENABLE
,
tenantEnable
:
import
.
meta
.
env
.
VITE_APP_TENANT_ENABLE
,
loginForm
:
{
tenantName
:
'芋道源码
'
,
username
:
'admin
'
,
password
:
'admin123
'
,
tenantName
:
import
.
meta
.
env
.
VITE_APP_DEFAULT_LOGIN_TENANT
||
'
'
,
username
:
import
.
meta
.
env
.
VITE_APP_DEFAULT_LOGIN_USERNAME
||
'
'
,
password
:
import
.
meta
.
env
.
VITE_APP_DEFAULT_LOGIN_PASSWORD
||
'
'
,
captchaVerification
:
''
,
rememberMe
:
true
// 默认记录我。如果不需要,可手动修改
}
...
...
types/env.d.ts
View file @
d883b860
...
...
@@ -14,6 +14,9 @@ interface ImportMetaEnv {
readonly
VITE_DEV
:
string
readonly
VITE_APP_CAPTCHA_ENABLE
:
string
readonly
VITE_APP_TENANT_ENABLE
:
string
readonly
VITE_APP_DEFAULT_LOGIN_TENANT
:
string
readonly
VITE_APP_DEFAULT_LOGIN_USERNAME
:
string
readonly
VITE_APP_DEFAULT_LOGIN_PASSWORD
:
string
readonly
VITE_APP_DOCALERT_ENABLE
:
string
readonly
VITE_BASE_URL
:
string
readonly
VITE_UPLOAD_URL
:
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