add relaunch after change inDutyCnt

main
Dawn1Ocean 2024-03-19 19:19:59 +08:00
parent 599166e603
commit 2ef04b96a1
2 changed files with 16 additions and 1 deletions

View File

@ -1,6 +1,13 @@
import { View } from '@tarojs/components'; import { View } from '@tarojs/components';
import { Component, ReactNode } from 'react'; import { Component, ReactNode } from 'react';
import { AtAccordion, AtButton, AtCard, AtInputNumber, AtList } from 'taro-ui'; import {
AtAccordion,
AtButton,
AtCard,
AtInputNumber,
AtList,
AtMessage,
} from 'taro-ui';
import Taro from '@tarojs/taro'; import Taro from '@tarojs/taro';
import pt from '@/plain-text'; import pt from '@/plain-text';
import { getUncompletedTicketList } from '@/service/uncompletedTicket'; import { getUncompletedTicketList } from '@/service/uncompletedTicket';
@ -149,6 +156,7 @@ export default class MemberPage extends Component<{}, MemberPageState> {
const fixListRenderer = this.state.fixList.map((item) => item.render()); const fixListRenderer = this.state.fixList.map((item) => item.render());
return ( return (
<View> <View>
<AtMessage />
<MemberTitleCard /> <MemberTitleCard />
<View style={{ width: '94%', marginLeft: '3%' }}> <View style={{ width: '94%', marginLeft: '3%' }}>
<View style={{ marginTop: '60rpx' }}> <View style={{ marginTop: '60rpx' }}>

View File

@ -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 changeDutyCnt(that: MemberPage) { export function changeDutyCnt(that: MemberPage) {
that.setState({ that.setState({
isLoading: true, isLoading: true,
@ -24,6 +26,11 @@ export function changeDutyCnt(that: MemberPage) {
message: pt.get().button.submitText.success, message: pt.get().button.submitText.success,
type: 'success', type: 'success',
}); });
setTimeout(() => {
Taro.reLaunch({
url: '/pages/member/member',
});
}, reLaunchInterval);
}) })
.catch((err) => { .catch((err) => {
console.log(err); console.log(err);