Commit d2ca5a94 by 姜雷

预约完成后进入预约记录刷新列表

parent 39a684d6
...@@ -88,7 +88,6 @@ function ShowerAppointment() { ...@@ -88,7 +88,6 @@ function ShowerAppointment() {
}, intervalTime); }, intervalTime);
} else { } else {
setLoopResultState(false); setLoopResultState(false);
setRecordId(0);
if (res.data === AppointResultRes.appointFail) { if (res.data === AppointResultRes.appointFail) {
Taro.showToast({ Taro.showToast({
title: res.msg || '预约失败', title: res.msg || '预约失败',
...@@ -119,6 +118,12 @@ function ShowerAppointment() { ...@@ -119,6 +118,12 @@ function ShowerAppointment() {
}; };
useEffect(() => { useEffect(() => {
if (recordId && showState === 2) {
resetRecordList();
setRecordId(0);
}
}, [recordId, showState]);
useEffect(() => {
let timer: NodeJS.Timeout | null = null; let timer: NodeJS.Timeout | null = null;
if (recordId) { if (recordId) {
setLoopResultState(true); setLoopResultState(true);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment