router.ts 708 B

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