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