router.ts 661 B

1234567891011121314151617181920
  1. export function toCertificationPage() {
  2. const navigate = wx.navigateTo({
  3. url: `/module/user/pages/user-certification/user-certification?hide=true`,
  4. events: {
  5. update: (data: { patientId: string }) => {
  6. if (data.patientId) {
  7. wx.setStorageSync('patientId', data.patientId);
  8. toChats('questionnaire')
  9. }
  10. }
  11. }
  12. })
  13. // navigate.then(res => { res.eventChannel.emit('navigateBack', { hide: true }); })
  14. return navigate;
  15. }
  16. export function toChats(component: 'guide' | 'questionnaire') {
  17. const navigate = wx.navigateTo({ url: `/module/chats/pages/index/index?component=${component}` })
  18. return navigate;
  19. }