Commit 3e3454b4 authored by cellee's avatar cellee

Merge branch 'final' of http://120.77.240.215:9701/Maple/tostumi.git into final

parents 0a284db6 e0bf3148
......@@ -28,6 +28,23 @@
padding: 60px 80px;
box-shadow: 1px 2px 20px 0px #ccc;
border-radius: 30px;
:global {
.ant-form-item-has-error .ant-input,
.ant-form-item-has-error .ant-input-affix-wrapper,
.ant-form-item-has-error .ant-input:hover,
.ant-form-item-has-error .ant-input-affix-wrapper:hover {
background: transparent !important;
}
}
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
-webkit-text-fill-color: #6a912cff !important;
transition: background-color 50000s ease-in-out 0s;
}
}
.lang {
......@@ -63,6 +80,23 @@
padding: 60px 80px;
box-shadow: 1px 2px 20px 0px #ccc;
border-radius: 30px;
:global {
.ant-form-item-has-error .ant-input,
.ant-form-item-has-error .ant-input-affix-wrapper,
.ant-form-item-has-error .ant-input:hover,
.ant-form-item-has-error .ant-input-affix-wrapper:hover {
background: transparent !important;
}
}
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
-webkit-text-fill-color: #6a912cff !important;
transition: background-color 50000s ease-in-out 0s;
}
}
}
......
......@@ -35,29 +35,6 @@ const UserLayout: React.FC<UserLayoutProps> = (props) => {
...props,
});
// useEffect(() => {
// console.log(location.pathname);
// if (location.pathname === '/user/login2') {
// console.log('更改ui');
// dispatch &&
// dispatch({
// type: 'login/goResetPwd',
// payload: {
// result: true,
// },
// });
// } else {
// dispatch &&
// dispatch({
// type: 'login/goResetPwd',
// payload: {
// result: false,
// },
// });
// }
// }, [location]);
console.log(result);
return (
<div className={styles.container + ' ' + (result ? styles.active : '')}>
<div className={styles.contain}>
......
......@@ -2,11 +2,12 @@ import React, { useState, useEffect } from 'react';
import { Result, Button, message } from 'antd';
import { connect, history } from 'umi';
// const { REACT_APP_ENV } = process.env;
const module = 'User';
const ResultPageFailed = () => {
const [resultId, setResultId] = useState('');
const [flag, setFlag] = useState(true);
const backPage = () => {
history.go(-1);
};
......@@ -33,13 +34,14 @@ const ResultPageFailed = () => {
extra={[
<Button type="primary" key="ok" onClick={handleDownload}>
{flag ? (
<a href={'http://192.168.1.28:8651/tos/excel/down?operator_id=' + resultId}>
Download
</a>
) : (
// <a href={'http://47.74.233.180:8651/tos/excel/down?operator_id=' + resultId}>
// Download
// </a>
// <a href={'http://192.168.1.28:8651/tos/excel/down?operator_id=' + resultId}>
// Download
// </a>
<a href={'/tos/excel/down?operator_id=' + resultId}>Download</a>
) : (
'Download'
)}
</Button>,
......
......@@ -30,6 +30,7 @@ let readyData: any = {
// 节流阀
let flag: boolean = false;
const Users = (props: any) => {
const permissionArr = JSON.parse(localStorage.getItem('permission') || '');
const { formatMessage } = useIntl();
......@@ -94,10 +95,12 @@ const Users = (props: any) => {
// 上传的模块
const propsUpload = {
name: 'file',
action: () => {
// return 'http://47.74.233.180:8651/tos/excel/upload?userId=' + id;
return 'http://192.168.1.28:8651/tos/excel/upload?userId=' + id;
},
// action: () => {
// // return 'http://47.74.233.180:8651/tos/excel/upload?userId=' + id;
// // return 'http://192.168.1.28:8651/tos/excel/upload?userId=' + id;
// return '/tos/excel/upload?userId=' + id;
// },
action: '/tos/excel/upload?userId=' + id,
beforeUpload: (file: any) => {
if (permissionArr.indexOf('4') < 0) {
message.error('No permissions');
......
......@@ -58,7 +58,6 @@ const Login: React.FC<LoginProps> = (props) => {
const res = await ValidateCaptcha({ account: values.userName, code: values.code });
if (res.error_code === '0000') {
console.log('通过跳转到修改密码页面');
dispatch({
type: 'login/goResetPwd',
payload: userName,
......
......@@ -15,13 +15,6 @@ const Login2 = (props: {
userStatus: number;
}) => {
const { history, result, dispatch, userName, userStatus } = props;
console.log(userName);
// const [resetPwd, setResetPwd] = useState(false);
// useEffect(() => {
// setResetPwd(result);
// }, [result]);
useEffect(() => {
if (!userName) {
......
......@@ -45,14 +45,6 @@
margin-bottom: 20px;
}
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
-webkit-text-fill-color: #6a912cff !important;
transition: background-color 50000s ease-in-out 0s;
}
.input {
border: none;
background: none;
......@@ -185,14 +177,6 @@ select:-webkit-autofill {
}
}
}
:global {
.ant-form-item-has-error .ant-input,
.ant-form-item-has-error .ant-input-affix-wrapper,
.ant-form-item-has-error .ant-input:hover,
.ant-form-item-has-error .ant-input-affix-wrapper:hover {
background: transparent !important;
}
}
.passBtn {
margin-top: 80px;
......
......@@ -48,17 +48,17 @@ export const getCookie = (key: string) => {
return '';
};
/**
* @param key 名字
* @param value 值
* @param time 存储时间
*/
export const setCookie = (key: string, value: string, time?: number) => {
let expires: string;
// 是否传入缓存时间
if (time) {
expires = "expores=" + time;
} else {
// cookie 设置时间,防止刷新就丢失
var d = new Date();
d.setTime(d.getTime() + 1 * 24 * 60 * 60 * 1000);
expires = 'expires=' + d.toUTCString();
}
const d = new Date();
// cookie 设置时间,防止刷新就丢失
d.setTime(d.getTime() + (time || 1) * 24 * 60 * 60 * 1000);
let expires = 'expires=' + d.toUTCString();
document.cookie = key + '=' + value + '; ' + expires + ';path=/';
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment