Commit 851262aa authored by Sixiang_Zzb's avatar Sixiang_Zzb

测试问题修复

parent db3e8fa2
......@@ -68,6 +68,7 @@ class SecurityLayout extends React.Component<SecurityLayoutProps, SecurityLayout
console.log('页面加载');
return <PageLoading />;
}
console.log(window.location.pathname);
if (!isLogin && window.location.pathname !== '/user/login') {
message.error('Please Re Login!', 3);
// console.log('未登录返回登录页!');
......
......@@ -79,7 +79,7 @@ export default {
address: tmp.addressAndpostalCode,
home: tmp.buildingNumber + '#' + tmp.floorNumber + '-' + tmp.roomNumber,
name: tmp.owerName,
phone: tmp.accountLogin != null ? tmp.accountLogin : tmp.owerPhone,
phone: tmp.owerPhone,
email: tmp.owerEmail,
content: resp.data.serviceContent,
replyContent: resp.data.replyContent,
......
......@@ -67,6 +67,8 @@ const Model: LoginModelType = {
console.log(userMessage);
console.log(userMessage.token);
setCookie('token', userMessage.token);
setCookie('name', userMessage.userModel.tosUserName);
setCookie('phone', userMessage.userModel.tosUserPhone);
localStorage.setItem('permission', JSON.stringify(userMessage.permission));
console.log('获取到Token:' + getCookie('token'));
yield put({
......
......@@ -103,7 +103,7 @@ const CardAdd = (props: any) => {
className={styles.buildNumber}
rules={[{ required: true, validator: checkData }]}
>
<Input style={{ width: 80 }} placeholder={'Building'} />
<Input style={{ width: 80 }} placeholder={'BLK'} />
</Form.Item>
<div style={{ lineHeight: 2, marginRight: 16 }}>#</div>
<Form.Item
......
......@@ -77,6 +77,8 @@ const Detail = (props: any) => {
fromRef.current.setFieldsValue(tmp);
}
setLoading(false);
} else {
history.back();
}
}, [CurDataDetail]);
......@@ -119,9 +121,7 @@ const Detail = (props: any) => {
{CurDataDetail.address}{' '}
</Descriptions.Item>
<Descriptions.Item label="User Name">{CurDataDetail.name}</Descriptions.Item>
<Descriptions.Item label="Contact Details">
{CurDataDetail.phone}{' '}
</Descriptions.Item>
<Descriptions.Item label="Contact Details">{CurDataDetail.phone}</Descriptions.Item>
<Descriptions.Item>{CurDataDetail.email}</Descriptions.Item>
</Descriptions>
<Row gutter={16}>
......
......@@ -57,7 +57,7 @@ const PropertyServices = (props: any) => {
),
},
{
title: 'Handle status',
title: 'Handle Status',
dataIndex: 'id',
render: (text: any, record: any) => (
<Space size="middle"> {handle_Status[record.handle_status][1]}</Space>
......
......@@ -85,6 +85,7 @@ const Login: React.FC<LoginProps> = (props) => {
const onGetCaptcha = useCallback(async (email: string) => {
// getFakeCaptcha
// getCaptcha
message.success('Has Been Sent!');
const result = await getCaptcha({ account: email });
console.log(result);
......@@ -92,7 +93,7 @@ const Login: React.FC<LoginProps> = (props) => {
if (result === false) {
return;
}
message.success('获取验证码成功!验证码为:1234');
setTiming(true);
}, []);
......@@ -144,7 +145,7 @@ const Login: React.FC<LoginProps> = (props) => {
</div>
) : (
<div>
<Form.Item name="password">
<Form.Item name="password" initialValue={userName || ''}>
<input className={styles.input2} type="password" />
</Form.Item>
<div>
......
......@@ -2,11 +2,9 @@ import { reloadAuthorized } from './Authorized';
// use localStorage to store the authority info, which might be sent from server in actual project.
export function getAuthority(str?: string): string | string[] {
console.log("获取权限")
const authorityString =
typeof str === 'undefined' && localStorage ? localStorage.getItem('antd-pro-authority') : str;
// authorityString could be admin, "admin", ["admin"]
console.log(authorityString)
let authority;
try {
if (authorityString) {
......
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