optimize pt structure
parent
0a98ea71ac
commit
74f644b3ee
|
|
@ -33,7 +33,7 @@ export default class InformPage extends Component {
|
|||
isLoading: false,
|
||||
});
|
||||
Taro.atMessage({
|
||||
message: pt.get().informPage.submitSuccessText,
|
||||
message: pt.get().informPage.submitText.success,
|
||||
type: 'success',
|
||||
});
|
||||
setTimeout(() => {
|
||||
|
|
@ -58,18 +58,18 @@ export default class InformPage extends Component {
|
|||
<AtMessage />
|
||||
<AtInput
|
||||
name='phone'
|
||||
title={pt.get().informPage.phoneTitleText}
|
||||
title={pt.get().informPage.phoneText.title}
|
||||
type='text'
|
||||
placeholder={pt.get().informPage.phonePlaceholderText}
|
||||
placeholder={pt.get().informPage.phoneText.placeholder}
|
||||
value={this.state.phone}
|
||||
onChange={this.handleChangePhone.bind(this)}
|
||||
/>
|
||||
<AtInput
|
||||
required
|
||||
name='name'
|
||||
title={pt.get().informPage.nameTitleText}
|
||||
title={pt.get().informPage.nameText.title}
|
||||
type='text'
|
||||
placeholder={pt.get().informPage.namePlaceholderText}
|
||||
placeholder={pt.get().informPage.nameText.placeholder}
|
||||
value={this.state.name}
|
||||
onChange={this.handleChangeName.bind(this)}
|
||||
/>
|
||||
|
|
@ -79,10 +79,10 @@ export default class InformPage extends Component {
|
|||
type='primary'
|
||||
disabled={this.state.isDisable}
|
||||
>
|
||||
{pt.get().informPage.submitText}
|
||||
{pt.get().informPage.buttonText.submit}
|
||||
</AtButton>
|
||||
<AtButton formType='reset' type='secondary'>
|
||||
{pt.get().informPage.resetText}
|
||||
{pt.get().informPage.buttonText.reset}
|
||||
</AtButton>
|
||||
</AtForm>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -58,10 +58,10 @@ export default class SettingsPage extends Component {
|
|||
type='primary'
|
||||
disabled={this.state.isDisable}
|
||||
>
|
||||
{pt.get().reportPage.submitText}
|
||||
{pt.get().reportPage.buttonText.submit}
|
||||
</AtButton>
|
||||
<AtButton formType='reset' type='secondary'>
|
||||
{pt.get().reportPage.resetText}
|
||||
{pt.get().reportPage.buttonText.reset}
|
||||
</AtButton>
|
||||
</AtForm>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -1,29 +1,53 @@
|
|||
export interface InformPageText {
|
||||
submitSuccessText: string;
|
||||
phoneTitleText: string;
|
||||
phonePlaceholderText: string;
|
||||
nameTitleText: string;
|
||||
namePlaceholderText: string;
|
||||
submitText: string;
|
||||
resetText: string;
|
||||
submitText: {
|
||||
success: string;
|
||||
};
|
||||
phoneText: {
|
||||
title: string;
|
||||
placeholder: string;
|
||||
};
|
||||
nameText: {
|
||||
title: string;
|
||||
placeholder: string;
|
||||
};
|
||||
buttonText: {
|
||||
submit: string;
|
||||
reset: string;
|
||||
};
|
||||
}
|
||||
|
||||
export const informPageZhCn: InformPageText = {
|
||||
submitSuccessText: '提交成功',
|
||||
phoneTitleText: '手机号码',
|
||||
phonePlaceholderText: '便于查询工单',
|
||||
nameTitleText: '真实姓名',
|
||||
namePlaceholderText: '必填,与工单绑定',
|
||||
submitText: '提交',
|
||||
resetText: '清空',
|
||||
submitText: {
|
||||
success: '提交成功',
|
||||
},
|
||||
phoneText: {
|
||||
title: '手机号码',
|
||||
placeholder: '便于查询工单',
|
||||
},
|
||||
nameText: {
|
||||
title: '真实姓名',
|
||||
placeholder: '必填,与工单绑定',
|
||||
},
|
||||
buttonText: {
|
||||
submit: '提交',
|
||||
reset: '清空',
|
||||
},
|
||||
};
|
||||
|
||||
export const informtPageEnUs: InformPageText = {
|
||||
submitSuccessText: 'Success',
|
||||
phoneTitleText: 'Phone',
|
||||
phonePlaceholderText: '便于查询工单',
|
||||
nameTitleText: 'Real Name',
|
||||
namePlaceholderText: '必填,与工单绑定',
|
||||
submitText: 'Submit',
|
||||
resetText: 'Reset',
|
||||
submitText: {
|
||||
success: 'Success',
|
||||
},
|
||||
phoneText: {
|
||||
title: 'Phone',
|
||||
placeholder: '便于查询工单',
|
||||
},
|
||||
nameText: {
|
||||
title: 'Real Name',
|
||||
placeholder: '必填,与工单绑定',
|
||||
},
|
||||
buttonText: {
|
||||
submit: 'Submit',
|
||||
reset: 'Reset',
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,19 +1,25 @@
|
|||
export interface ReportPageText {
|
||||
placeHolderText: string;
|
||||
submitText: string;
|
||||
resetText: string;
|
||||
buttonText: {
|
||||
submit: string;
|
||||
reset: string;
|
||||
};
|
||||
}
|
||||
|
||||
export const reportPageZhCn: ReportPageText = {
|
||||
placeHolderText:
|
||||
'无论是有关于小程序的建议,还是关于E志者协会的建议,都可以提出来哦!',
|
||||
submitText: '提交',
|
||||
resetText: '清空',
|
||||
buttonText: {
|
||||
submit: '提交',
|
||||
reset: '清空',
|
||||
},
|
||||
};
|
||||
|
||||
export const reportPageEnUs: ReportPageText = {
|
||||
placeHolderText:
|
||||
'无论是有关于小程序的建议,还是关于E志者协会的建议,都可以提出来哦!',
|
||||
submitText: 'Submit',
|
||||
resetText: 'Reset',
|
||||
buttonText: {
|
||||
submit: 'Submit',
|
||||
reset: 'Reset',
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue