fix(mobile): drive learning search from assignments
This commit is contained in:
@@ -13,3 +13,18 @@ export const resetPageScroll = () => {
|
||||
setTimeout(scrollTop, 80);
|
||||
setTimeout(scrollTop, 240);
|
||||
};
|
||||
|
||||
const switchToToday = () => {
|
||||
uni.switchTab({ url: '/pages/user/today/index' });
|
||||
};
|
||||
|
||||
export const navigateBackToToday = () => {
|
||||
if (getCurrentPages().length <= 1) {
|
||||
switchToToday();
|
||||
return;
|
||||
}
|
||||
uni.navigateBack({
|
||||
delta: 1,
|
||||
fail: switchToToday
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user