add relaunch ticketdetail after changing it

main
Dawn_Ocean 2024-03-18 14:56:02 +08:00
parent cd3064c90f
commit 3db6425dc3
1 changed files with 7 additions and 0 deletions

View File

@ -3,6 +3,8 @@ import Taro from '@tarojs/taro';
import pt from '@/plain-text';
import { getUrl } from '.';
const reLaunchInterval = 1000;
export function pickTicket(that: TicketDetail) {
that.setState({
isPickLoading: true,
@ -24,6 +26,11 @@ export function pickTicket(that: TicketDetail) {
message: pt.get().button.submitText.success,
type: 'success',
});
setTimeout(() => {
Taro.reLaunch({
url: '/pages/TicketDetail/TicketDetail?id=' + that.state.id,
});
}, reLaunchInterval);
})
.catch((err) => {
console.log(err);