Commit 160cecc8 authored by Sixiang_Zzb's avatar Sixiang_Zzb

测试bug修复

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