beautify /user/inform /user/report ui
parent
2ef04b96a1
commit
d705970d1f
|
|
@ -60,7 +60,7 @@ export default class InformPage extends Component {
|
|||
|
||||
render(): ReactNode {
|
||||
return (
|
||||
<View>
|
||||
<View style={{ marginTop: '30rpx', width: '94%', marginLeft: '3%' }}>
|
||||
<AtForm onSubmit={this.onSubmit.bind(this)}>
|
||||
<AtMessage />
|
||||
<AtInput
|
||||
|
|
@ -83,14 +83,16 @@ export default class InformPage extends Component {
|
|||
value={this.state.name}
|
||||
onChange={this.handleChangeName.bind(this)}
|
||||
/>
|
||||
<AtButton
|
||||
loading={this.state.isLoading}
|
||||
formType='submit'
|
||||
type='primary'
|
||||
disabled={this.state.isDisable}
|
||||
>
|
||||
{pt.get().button.buttonText.submit}
|
||||
</AtButton>
|
||||
<View style={{ marginTop: '30rpx' }}>
|
||||
<AtButton
|
||||
loading={this.state.isLoading}
|
||||
formType='submit'
|
||||
type='primary'
|
||||
disabled={this.state.isDisable}
|
||||
>
|
||||
{pt.get().button.buttonText.submit}
|
||||
</AtButton>
|
||||
</View>
|
||||
</AtForm>
|
||||
</View>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ import { Component, ReactNode } from 'react';
|
|||
import Taro from '@tarojs/taro';
|
||||
import pt from '@/plain-text';
|
||||
import { reportMessage } from '@/service/report';
|
||||
import { View } from '@tarojs/components';
|
||||
import './report.scss';
|
||||
|
||||
const submitInterval = 5000;
|
||||
|
|
@ -55,29 +56,53 @@ export default class ReportPage extends Component {
|
|||
}
|
||||
render(): ReactNode {
|
||||
return (
|
||||
<AtForm
|
||||
onSubmit={this.onSubmit.bind(this)}
|
||||
onReset={this.onReset.bind(this)}
|
||||
>
|
||||
<AtMessage />
|
||||
<AtTextarea
|
||||
value={this.state.report}
|
||||
onChange={this.handleChange.bind(this)}
|
||||
maxLength={200}
|
||||
placeholder={pt.get().reportPage.placeHolderText}
|
||||
/>
|
||||
<AtButton
|
||||
loading={this.state.isLoading}
|
||||
formType='submit'
|
||||
type='primary'
|
||||
disabled={this.state.isDisable}
|
||||
<View style={{ marginTop: '30rpx', width: '94%', marginLeft: '3%' }}>
|
||||
<AtForm
|
||||
onSubmit={this.onSubmit.bind(this)}
|
||||
onReset={this.onReset.bind(this)}
|
||||
>
|
||||
{pt.get().button.buttonText.submit}
|
||||
</AtButton>
|
||||
<AtButton formType='reset' type='secondary'>
|
||||
{pt.get().button.buttonText.reset}
|
||||
</AtButton>
|
||||
</AtForm>
|
||||
<AtMessage />
|
||||
<AtTextarea
|
||||
value={this.state.report}
|
||||
onChange={this.handleChange.bind(this)}
|
||||
maxLength={200}
|
||||
placeholder={pt.get().reportPage.placeHolderText}
|
||||
/>
|
||||
<View className='at-row'>
|
||||
<View
|
||||
className='at-col'
|
||||
style={{
|
||||
marginTop: '30rpx',
|
||||
marginRight: '10rpx',
|
||||
marginLeft: '10rpx',
|
||||
width: '50%',
|
||||
}}
|
||||
>
|
||||
<AtButton formType='reset' type='secondary'>
|
||||
{pt.get().button.buttonText.reset}
|
||||
</AtButton>
|
||||
</View>
|
||||
<View
|
||||
className='at-col'
|
||||
style={{
|
||||
marginTop: '30rpx',
|
||||
marginRight: '10rpx',
|
||||
marginLeft: '10rpx',
|
||||
width: '50%',
|
||||
}}
|
||||
>
|
||||
<AtButton
|
||||
loading={this.state.isLoading}
|
||||
formType='submit'
|
||||
type='primary'
|
||||
disabled={this.state.isDisable}
|
||||
>
|
||||
{pt.get().button.buttonText.submit}
|
||||
</AtButton>
|
||||
</View>
|
||||
</View>
|
||||
</AtForm>
|
||||
</View>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import Taro from '@tarojs/taro';
|
|||
import pt from '@/plain-text';
|
||||
import { getUrl } from '.';
|
||||
|
||||
const relaunchInterval = 1000;
|
||||
|
||||
export function submitTicket(that: RepairPage) {
|
||||
that.setState({
|
||||
isLoading: true,
|
||||
|
|
@ -30,9 +32,11 @@ export function submitTicket(that: RepairPage) {
|
|||
message: pt.get().button.submitText.success,
|
||||
type: 'success',
|
||||
});
|
||||
Taro.reLaunch({
|
||||
url: '/pages/repair/repair',
|
||||
});
|
||||
setTimeout(() => {
|
||||
Taro.reLaunch({
|
||||
url: '/pages/repair/repair',
|
||||
});
|
||||
}, relaunchInterval);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
|
|
|
|||
Loading…
Reference in New Issue