|
|
|
@ -18,6 +18,7 @@ const TechLoginView = () => {
|
|
|
|
|
const paramValue = searchParams.get('token');
|
|
|
|
|
const pathValue = searchParams.get('path');
|
|
|
|
|
// const history = useHistory();
|
|
|
|
|
console.log("token111:" + paramValue, "pathValue111:" + pathValue, searchParams);
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
|
console.log("token:" + paramValue, "pathValue:" + pathValue);
|
|
|
|
@ -27,7 +28,7 @@ const TechLoginView = () => {
|
|
|
|
|
|
|
|
|
|
const current = (date: string) => {
|
|
|
|
|
|
|
|
|
|
// console.log("date", date)
|
|
|
|
|
console.log("date", date)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestaxios
|
|
|
|
@ -39,11 +40,11 @@ const TechLoginView = () => {
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.then(({ data }) => {
|
|
|
|
|
// console.log("data", data.code);
|
|
|
|
|
console.log("data", data.code, data);
|
|
|
|
|
|
|
|
|
|
if (data.loginName != undefined) {
|
|
|
|
|
//拿到账号密码之后进行登录
|
|
|
|
|
// console.log(data);
|
|
|
|
|
console.log(data);
|
|
|
|
|
|
|
|
|
|
let month = new Date().getTime() + 1000 * 24 * 3600 * 30 * 3
|
|
|
|
|
utils.saveCookie('CZtoken', paramValue, month)
|
|
|
|
@ -52,12 +53,12 @@ const TechLoginView = () => {
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
message.error('获取财智系统用户信息报错!');
|
|
|
|
|
window.location.href = "https://metal.dayesteel.com.cn";
|
|
|
|
|
// window.location.href = "https://metal.dayesteel.com.cn";
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
.catch((reason) => {
|
|
|
|
|
message.error('调取财智系统用户信息报错' + reason);
|
|
|
|
|
window.location.href = "https://metal.dayesteel.com.cn";
|
|
|
|
|
// window.location.href = "https://metal.dayesteel.com.cn";
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
const doLogin = async (UserId: string) => {
|
|
|
|
@ -77,6 +78,7 @@ const TechLoginView = () => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let result = await MicroApps.GetRuntimeUser().doLogin(loginId, "000000")
|
|
|
|
|
console.log("resultresult111111111111", result)
|
|
|
|
|
|
|
|
|
|
if (isString(result)) {
|
|
|
|
|
message.error(result)
|
|
|
|
@ -85,10 +87,13 @@ const TechLoginView = () => {
|
|
|
|
|
|
|
|
|
|
let redirect: any = history.location.query?.redirect
|
|
|
|
|
let jumpTo: string | undefined = undefined
|
|
|
|
|
|
|
|
|
|
console.log("111111111111", redirect)
|
|
|
|
|
if (redirect) {
|
|
|
|
|
let rd = decodeURIComponent(redirect)
|
|
|
|
|
jumpTo = isUrl(rd) ? rd : undefined
|
|
|
|
|
|
|
|
|
|
console.log("22222222222", rd, jumpTo)
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (jumpTo) {
|
|
|
|
@ -125,6 +130,7 @@ const TechLoginView = () => {
|
|
|
|
|
}
|
|
|
|
|
return (
|
|
|
|
|
<>
|
|
|
|
|
2222222222222222
|
|
|
|
|
</>);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|