Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
TOSTUMI
Project
Project
Details
Activity
Releases
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
Maple
TOSTUMI
Commits
a0ec19bb
Commit
a0ec19bb
authored
Feb 10, 2021
by
cellee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Signed-off-by: cellee <893264950@qq.com>
parent
622e5fdd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
proxy.ts
config/proxy.ts
+6
-6
index.tsx
src/pages/user/login/index.tsx
+4
-1
No files found.
config/proxy.ts
View file @
a0ec19bb
...
@@ -86,15 +86,15 @@ export default {
...
@@ -86,15 +86,15 @@ export default {
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
pathRewrite
:
{
'^'
:
''
},
},
},
// '/tos/': {
// target: 'http://47.74.233.180:8651',
// changeOrigin: true,
// pathRewrite: { '^': '' },
// },
'/tos/'
:
{
'/tos/'
:
{
target
:
'http://
192.168.1.28
:8651'
,
target
:
'http://
47.74.233.180
:8651'
,
changeOrigin
:
true
,
changeOrigin
:
true
,
pathRewrite
:
{
'^'
:
''
},
pathRewrite
:
{
'^'
:
''
},
},
},
// '/tos/': {
// target: 'http://192.168.1.28:8651',
// changeOrigin: true,
// pathRewrite: { '^': '' },
// },
},
},
};
};
src/pages/user/login/index.tsx
View file @
a0ec19bb
import
{
ArrowLeftOutlined
}
from
'@ant-design/icons'
;
import
{
ArrowLeftOutlined
}
from
'@ant-design/icons'
;
import
{
message
,
Form
,
Button
,
Checkbox
,
Input
}
from
'antd'
;
import
{
message
,
Form
,
Button
,
Checkbox
,
Input
}
from
'antd'
;
import
React
,
{
useState
,
useEffect
,
useCallback
}
from
'react'
;
import
React
,
{
useState
,
useEffect
,
useCallback
}
from
'react'
;
import
{
connect
,
Dispatch
,
history
}
from
'umi'
;
import
{
connect
,
Dispatch
,
history
,
setLocale
}
from
'umi'
;
import
{
StateType
}
from
'@/models/login'
;
import
{
StateType
}
from
'@/models/login'
;
import
{
LoginParamsType
,
getCaptcha
,
ValidateCaptcha
}
from
'@/services/login'
;
import
{
LoginParamsType
,
getCaptcha
,
ValidateCaptcha
}
from
'@/services/login'
;
import
{
ConnectState
}
from
'@/models/connect'
;
import
{
ConnectState
}
from
'@/models/connect'
;
...
@@ -49,6 +49,9 @@ const Login: React.FC<LoginProps> = (props) => {
...
@@ -49,6 +49,9 @@ const Login: React.FC<LoginProps> = (props) => {
// 提交按钮
// 提交按钮
const
handleSubmit
=
async
(
values
:
LoginParamsType
)
=>
{
const
handleSubmit
=
async
(
values
:
LoginParamsType
)
=>
{
// 暂时登录直接设施英文
setLocale
(
'en-US'
,
false
);
if
(
forgetflag
)
{
if
(
forgetflag
)
{
if
(
!
values
.
userName
||
!
values
.
code
)
{
if
(
!
values
.
userName
||
!
values
.
code
)
{
message
.
error
(
'The mailbox or verification code cannot be empty!!!'
);
message
.
error
(
'The mailbox or verification code cannot be empty!!!'
);
...
...
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