提交 7d02cbd8 authored 作者: 钟是志's avatar 钟是志

25516 2021030552 h5 在我的事务中查看维修待办已办数据 从哪条数据进去 然后返回 就在哪条数据

上级 8bbca3d3
...@@ -16,6 +16,10 @@ const myCollect = { ...@@ -16,6 +16,10 @@ const myCollect = {
todoListApps: [], todoListApps: [],
todoListMessage: [], todoListMessage: [],
goBackInfo: {}, goBackInfo: {},
pageInfo: {
totalPage: 1,
total: 0,
},
}, },
effects: { effects: {
/** /**
...@@ -48,6 +52,13 @@ const myCollect = { ...@@ -48,6 +52,13 @@ const myCollect = {
payload: { payload: {
todoListMessage: response, todoListMessage: response,
}, },
});
yield put({
type: 'savePageInfo',
payload: {
totalPage: Number(response.totalPage),
total: Number(response.total),
},
}); });
} }
if (callback && typeof callback === 'function') { if (callback && typeof callback === 'function') {
...@@ -68,6 +79,13 @@ const myCollect = { ...@@ -68,6 +79,13 @@ const myCollect = {
yield put({ type: 'nom' }); yield put({ type: 'nom' });
return; return;
} }
yield put({
type: 'savePageInfo',
payload: {
totalPage: Number(response.totalPage),
total: Number(response.total),
},
});
if (callback) { if (callback) {
callback(response); callback(response);
} }
...@@ -86,6 +104,13 @@ const myCollect = { ...@@ -86,6 +104,13 @@ const myCollect = {
yield put({ type: 'nom' }); yield put({ type: 'nom' });
return; return;
} }
yield put({
type: 'savePageInfo',
payload: {
totalPage: Number(response.totalPage),
total: Number(response.total),
},
});
if (callback) { if (callback) {
callback(response); callback(response);
} }
...@@ -104,6 +129,13 @@ const myCollect = { ...@@ -104,6 +129,13 @@ const myCollect = {
yield put({ type: 'nom' }); yield put({ type: 'nom' });
return; return;
} }
yield put({
type: 'savePageInfo',
payload: {
totalPage: Number(response.totalPage),
total: Number(response.total),
},
});
if (callback) { if (callback) {
callback(response); callback(response);
} }
...@@ -308,6 +340,12 @@ const myCollect = { ...@@ -308,6 +340,12 @@ const myCollect = {
...state, ...state,
goBackInfo: payload, goBackInfo: payload,
}; };
},
savePageInfo(state, { payload }) {
return {
...state,
pageInfo: payload,
};
}, },
}, },
}; };
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论