| 123456789101112131415161718192021222324252627282930313233 |
- export function toSchemePage(id?: string) {
- if (!id) {
- wx.showToast({ title: '暂无调理方案', icon: 'none' });
- return
- }
- const route = 'module/health/pages/scheme/scheme';
- const pages = getCurrentPages();
- const historyIndex = pages.reverse().findIndex(page => page.route === route);
- if (historyIndex !== -1 && pages[historyIndex].options?.id === id) {
- wx.navigateBack({ delta: historyIndex + 1 });
- } else {
- wx.navigateTo({ url: `/${route}?id=${id}` });
- }
- }
- export function toReportPage(id?: string) {
- if (!id) {
- wx.showToast({ title: '暂无分析报告', icon: 'none' });
- return
- }
- const route = 'module/health/pages/report/report';
- const pages = getCurrentPages();
- const historyIndex = pages.reverse().findIndex(page => page.route === route);
- if (historyIndex !== -1 && pages[historyIndex].options?.id === id) {
- wx.navigateBack({ delta: historyIndex + 1 });
- } else {
- wx.navigateTo({ url: `/${route}?id=${id}` });
- }
- }
|