Commit 160cecc8 authored by Sixiang_Zzb's avatar Sixiang_Zzb

测试bug修复

parent 5a981862
...@@ -14,10 +14,10 @@ const module = 'CommunityService'; ...@@ -14,10 +14,10 @@ const module = 'CommunityService';
// const apply_status = [[0, "审核中"], [1, "批准"], [2, "拒绝"], [3, "领取"]] // const apply_status = [[0, "审核中"], [1, "批准"], [2, "拒绝"], [3, "领取"]]
const apply_status = [ const apply_status = [
[0, 'Under review'], [0, 'Pending'],
[1, 'Approval'], [1, 'Approval'],
[2, 'Reject'], [2, 'Reject'],
[3, 'Claim'], [3, 'Received'],
]; ];
const apply_relation_owner = ['Oneself', 'Family Members', 'Tenant ']; const apply_relation_owner = ['Oneself', 'Family Members', 'Tenant '];
...@@ -34,7 +34,8 @@ const CardDetail = (props: any) => { ...@@ -34,7 +34,8 @@ const CardDetail = (props: any) => {
useEffect(() => { useEffect(() => {
if (DataSave != null) { if (DataSave != null) {
RA(36, { id: DataSave.id }, module, dispatch); console.log(DataSave);
// RA(36, { id: DataSave.id }, module, dispatch);
} else { } else {
history.go(-1); history.go(-1);
} }
...@@ -57,8 +58,9 @@ const CardDetail = (props: any) => { ...@@ -57,8 +58,9 @@ const CardDetail = (props: any) => {
type: '7', type: '7',
}; };
RA(34, tmp, module, dispatch); RA(34, tmp, module, dispatch);
message.success('Success Operation!'); // message.success('Success Operation!');
history.push('/CommercialService/AccessCardApplication'); // history.push('/CommercialService/AccessCardApplication');
// history.go(-1);
}; };
return ( return (
...@@ -78,12 +80,7 @@ const CardDetail = (props: any) => { ...@@ -78,12 +80,7 @@ const CardDetail = (props: any) => {
<Col span={3}>{DataSave.community_name}</Col> <Col span={3}>{DataSave.community_name}</Col>
<Col>Unit:</Col> <Col>Unit:</Col>
<Col> <Col>
{'BLK ' + {DataSave.build_number + '#' + DataSave.floor_number + '-' + DataSave.room_number}
DataSave.build_number +
'#' +
DataSave.floor_number +
'-' +
DataSave.room_number}
</Col> </Col>
</Row> </Row>
...@@ -98,14 +95,14 @@ const CardDetail = (props: any) => { ...@@ -98,14 +95,14 @@ const CardDetail = (props: any) => {
<Col>Owner Name:</Col> <Col>Owner Name:</Col>
<Col span={3}>{DataSave.community_owner}</Col> <Col span={3}>{DataSave.community_owner}</Col>
<Col>Phone:</Col> <Col>Phone:</Col>
<Col>13169646231</Col> <Col>{DataSave.community_owner_phone}</Col>
</Row> </Row>
<Line></Line> <Line></Line>
<Row gutter={8} style={{ marginTop: 16 }}> <Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Apply Name:</Col> <Col span={3}>Apply Name:</Col>
<Col span={3}>{DataSave.apply_name}</Col> <Col span={3}>{DataSave.apply_name}</Col>
<Col>Phone:</Col> <Col>Phone:</Col>
<Col>13169646231</Col> <Col>{DataSave.apply_name_phone}</Col>
</Row> </Row>
<Row gutter={8} style={{ marginTop: 16 }}> <Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Relationship:</Col> <Col span={3}>Relationship:</Col>
......
...@@ -27,6 +27,7 @@ const RenovationDetail = (props: any) => { ...@@ -27,6 +27,7 @@ const RenovationDetail = (props: any) => {
if (!DataSave) { if (!DataSave) {
history.go(-1); history.go(-1);
} }
console.log(DataSave);
}, []); }, []);
const onFinish = (values: any) => { const onFinish = (values: any) => {
...@@ -50,8 +51,9 @@ const RenovationDetail = (props: any) => { ...@@ -50,8 +51,9 @@ const RenovationDetail = (props: any) => {
}; };
RA(33, tmp, module, dispatch); RA(33, tmp, module, dispatch);
message.success('Success Operation!'); // message.success('Success Operation!');
history.push('/CommercialService/RenovationApplication'); // history.push('/CommercialService/RenovationApplication');
// history.go(-1);
}; };
return ( return (
...@@ -64,13 +66,13 @@ const RenovationDetail = (props: any) => { ...@@ -64,13 +66,13 @@ const RenovationDetail = (props: any) => {
'Status : ' + decoration_status[DataSave.decoration_status][1], 'Status : ' + decoration_status[DataSave.decoration_status][1],
'Time : ' + timestampToTime(DataSave.create_time.time), 'Time : ' + timestampToTime(DataSave.create_time.time),
]} ]}
title={'Renovation Detail'} title={DataSave.decoration_status === 0 ? 'Renovation Reply' : 'Renovation Detail'}
></TitleBack> ></TitleBack>
<Row gutter={8}> <Row gutter={8}>
<Col>Community:</Col> <Col>Community:</Col>
<Col span={3}>{DataSave.community_name}</Col> <Col span={3}>{DataSave.community_name}</Col>
<Col>unit:</Col> <Col>Unit:</Col>
<Col> <Col>
{DataSave.community_build_decorate}#{DataSave.community_floor_decorate}- {DataSave.community_build_decorate}#{DataSave.community_floor_decorate}-
{DataSave.community_room_decoate} {DataSave.community_room_decoate}
...@@ -86,14 +88,14 @@ const RenovationDetail = (props: any) => { ...@@ -86,14 +88,14 @@ const RenovationDetail = (props: any) => {
<Col>Owner Name:</Col> <Col>Owner Name:</Col>
<Col span={3}>{DataSave.applyfor_name}</Col> <Col span={3}>{DataSave.applyfor_name}</Col>
<Col>Phone:</Col> <Col>Phone:</Col>
<Col>{DataSave.applyfor_phone}</Col> <Col>{DataSave.contact_phone}</Col>
</Row> </Row>
<Line></Line> <Line></Line>
<Row gutter={8} style={{ marginTop: 16 }}> <Row gutter={8} style={{ marginTop: 16 }}>
<Col span={3}>Contract Name:</Col> <Col span={3}>Contract Name:</Col>
<Col span={3}>{DataSave.contact_name}</Col> <Col span={3}>{DataSave.contact_name}</Col>
<Col>Phone:</Col> <Col span={3}>Phone:</Col>
<Col>{DataSave.contact_phone}</Col> <Col>{DataSave.contact_phone}</Col>
</Row> </Row>
<Row gutter={8} style={{ marginTop: 16 }}> <Row gutter={8} style={{ marginTop: 16 }}>
...@@ -154,7 +156,7 @@ const RenovationDetail = (props: any) => { ...@@ -154,7 +156,7 @@ const RenovationDetail = (props: any) => {
<Row> <Row>
<Col span={3}>replier:</Col> <Col span={3}>replier:</Col>
<Col span={3}>{DataSave.reply_name}</Col> <Col span={3}>{DataSave.reply_name}</Col>
<Col>Phone: </Col> <Col span={3}>Phone: </Col>
<Col>{DataSave.reply_phone}</Col> <Col>{DataSave.reply_phone}</Col>
</Row> </Row>
......
...@@ -24,14 +24,20 @@ const Login: React.FC<LoginProps> = (props) => { ...@@ -24,14 +24,20 @@ const Login: React.FC<LoginProps> = (props) => {
const [timing, setTiming] = useState(false); const [timing, setTiming] = useState(false);
// 提交按钮 // 提交按钮
const handleSubmit = (values: LoginParamsType) => { const handleSubmit = async (values: LoginParamsType) => {
console.log(values); console.log(values);
if (forgetflag) { if (forgetflag) {
console.log('校验验证码!'); console.log('校验验证码!');
// ValidateCaptcha({account,code}) console.log(userName);
if (true) { console.log(values);
const res = await ValidateCaptcha({ account: values.userName, code: values.code });
console.log(res);
if (res.error_code === '0000') {
console.log('通过跳转到修改密码页面'); console.log('通过跳转到修改密码页面');
history.push('login2'); history.push('login2');
} else {
message.error('membercode!');
} }
} else { } else {
if (values.userName && values.password) { if (values.userName && values.password) {
...@@ -85,16 +91,12 @@ const Login: React.FC<LoginProps> = (props) => { ...@@ -85,16 +91,12 @@ const Login: React.FC<LoginProps> = (props) => {
const onGetCaptcha = useCallback(async (email: string) => { const onGetCaptcha = useCallback(async (email: string) => {
// getFakeCaptcha // getFakeCaptcha
// getCaptcha // getCaptcha
message.success('Has Been Sent!'); setTiming(true);
const result = await getCaptcha({ account: email }); const result = await getCaptcha({ account: email });
console.log(result); console.log(result);
if (result.error_code === '0000') {
return; message.success('Has Been Sent!');
if (result === false) {
return;
} }
setTiming(true);
}, []); }, []);
useEffect(() => { useEffect(() => {
...@@ -138,14 +140,16 @@ const Login: React.FC<LoginProps> = (props) => { ...@@ -138,14 +140,16 @@ const Login: React.FC<LoginProps> = (props) => {
</div> </div>
{forgetflag ? ( {forgetflag ? (
<div className={styles.box2}> <div className={styles.box2}>
<Form.Item name="code" initialValue="">
<input className={styles.input5} /> <input className={styles.input5} />
</Form.Item>
<div className={styles.button2} style={{ float: 'right' }} onClick={handleSend}> <div className={styles.button2} style={{ float: 'right' }} onClick={handleSend}>
{timing ? `${count} 秒` : 'Send'} {timing ? `${count} 秒` : 'Send'}
</div> </div>
</div> </div>
) : ( ) : (
<div> <div>
<Form.Item name="password" initialValue={userName || ''}> <Form.Item name="password" initialValue="">
<input className={styles.input2} type="password" /> <input className={styles.input2} type="password" />
</Form.Item> </Form.Item>
<div> <div>
......
...@@ -3,6 +3,7 @@ import request from '@/utils/request'; ...@@ -3,6 +3,7 @@ import request from '@/utils/request';
export interface LoginParamsType { export interface LoginParamsType {
userName: string; userName: string;
password: string; password: string;
code: string;
} }
export interface CodeType { export interface CodeType {
account: string; account: string;
......
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