Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
glsx-web
/
achievements-system-front
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit bc8d34ba
authored
Jun 13, 2023
by
杨明
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
ec631ec7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
package-lock.json
src/api/request/index.ts
src/views/Login/index.tsx
package-lock.json
View file @
bc8d34b
This diff is collapsed.
Click to expand it.
src/api/request/index.ts
View file @
bc8d34b
import
HttpRequest
from
"./request"
;
const
config
=
{
baseUrl
:
{
dev
:
"http://
192.168.3.115:8101
"
,
prod
:
"http://
config-center
-backend.test.glsx.com.cn"
,
//test环境
dev
:
"http://
achievements-system-backend.test.glsx.com.cn
"
,
prod
:
"http://
achievements-system
-backend.test.glsx.com.cn"
,
//test环境
},
};
const
baseUrl
=
...
...
src/views/Login/index.tsx
View file @
bc8d34b
...
...
@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-03-03 10:30:06
* @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-0
3-21 15:31:57
* @LastEditTime: 2023-0
6-13 10:49:19
* @FilePath: \achievements-system-front\src\views\Login\index.tsx
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
...
...
@@ -17,7 +17,7 @@ const App = () => {
const { username, password } = values;
const params = { username, password };
loginApi(params)
.then(({ code, data, msg }) => {
.then(({ code, data, m
essage: m
sg }) => {
console.log(code);
if (code === 200) {
window.sessionStorage.setItem("token", data && data.token);
...
...
@@ -27,7 +27,7 @@ const App = () => {
);
navigate("/emp");
} else {
message.error(
msg
);
message.error(
"账号密码错误!"
);
}
})
.catch(({ message: msg }) => {
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment