router.ts 744 B

123456789101112131415161718192021
  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',messageType:number) {
  17. console.log("component",component)
  18. const navigate = wx.navigateTo({ url: `/module/chats/pages/index/index?component=${component}&messageType=${messageType}` })
  19. return navigate;
  20. }