|
@@ -1,7 +1,7 @@
|
1
|
1
|
import React, { useEffect } from "react";
|
2
|
2
|
import md5 from "md5";
|
3
|
3
|
import { Button, Form, Input, Radio } from "antd";
|
4
|
|
-import { useNavigate, useSearchParams } from "react-router-dom";
|
|
4
|
+import { useNavigate,useParams, useSearchParams } from "react-router-dom";
|
5
|
5
|
import { login } from "@/services/login";
|
6
|
6
|
import { useModel } from "@/store";
|
7
|
7
|
|
|
@@ -11,15 +11,10 @@ export default (props) => {
|
11
|
11
|
const [loading, setLoading] = React.useState(false);
|
12
|
12
|
const { user, getCurrentUser } = useModel("user");
|
13
|
13
|
|
14
|
|
- // var path = window.location.pathname;
|
15
|
|
- // var tenantIds = path.split("/")[1];
|
16
|
|
-
|
17
|
|
- useEffect(() => {
|
18
|
|
- pathTenantId();
|
19
|
|
- }, [pathTenantId()]);
|
20
|
|
-
|
|
14
|
+
|
|
15
|
+ const {tenantId} = useParams();
|
21
|
16
|
const onFinish = (values) => {
|
22
|
|
- const tenantId = localStorage.getItem("tenantId");
|
|
17
|
+ localStorage.setItem("tenantId",tenantId)
|
23
|
18
|
const data = {
|
24
|
19
|
loginType: "admin.pc",
|
25
|
20
|
loginName: values.loginName,
|