add relaunch ticketdetail after changing it
parent
cd3064c90f
commit
3db6425dc3
|
|
@ -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 pickTicket(that: TicketDetail) {
|
export function pickTicket(that: TicketDetail) {
|
||||||
that.setState({
|
that.setState({
|
||||||
isPickLoading: true,
|
isPickLoading: true,
|
||||||
|
|
@ -24,6 +26,11 @@ export function pickTicket(that: TicketDetail) {
|
||||||
message: pt.get().button.submitText.success,
|
message: pt.get().button.submitText.success,
|
||||||
type: 'success',
|
type: 'success',
|
||||||
});
|
});
|
||||||
|
setTimeout(() => {
|
||||||
|
Taro.reLaunch({
|
||||||
|
url: '/pages/TicketDetail/TicketDetail?id=' + that.state.id,
|
||||||
|
});
|
||||||
|
}, reLaunchInterval);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue