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