YTRouter.ets 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import { DelPhotoParam } from '../models'
  2. class YTRouter extends NavPathStack {
  3. router2SettingPage() {
  4. yTRouter.pushPathByName('SettingPage', '')
  5. }
  6. router2SuggestionPage() {
  7. yTRouter.pushPathByName('SuggestionPage', '')
  8. }
  9. router2AgreementPage(param: '关于我们' | '隐私政策' | '用户协议') {
  10. yTRouter.pushPathByName('AgreementPage', param)
  11. }
  12. /**
  13. * 跳转至用户协议
  14. */
  15. router2userAgreement() {
  16. yTRouter.pushPathByName('UserAgreementPage', '')
  17. }
  18. /**
  19. * 跳转至隐私政策
  20. */
  21. router2Privacy() {
  22. yTRouter.pushPathByName('Privacy', '')
  23. }
  24. router2AboutUS() {
  25. yTRouter.pushPathByName('AboutUS', '')
  26. }
  27. getAgreementPageParam() {
  28. return yTRouter.getParamByName('AgreementPage').pop() as '关于我们' | '隐私政策' | '用户协议'
  29. }
  30. router2LoginPage() {
  31. yTRouter.pushPathByName('LoginPage', '')
  32. }
  33. router2DelPhotoPage(param: DelPhotoParam) {
  34. yTRouter.pushPathByName('DelPhotoPage', param)
  35. }
  36. getDelPhotoParam() {
  37. return yTRouter.getParamByName('DelPhotoPage').pop() as DelPhotoParam
  38. }
  39. routerBack() {
  40. yTRouter.pop()
  41. }
  42. }
  43. export const yTRouter = new YTRouter()