| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- import { DelPhotoParam } from '../models'
- export class YTRouter extends NavPathStack {
- private static declare instance: YTRouter
- private constructor() {
- super()
- }
- static getInstance() {
- if (!YTRouter.instance) {
- YTRouter.instance = new YTRouter()
- }
- return YTRouter.instance
- }
- router2SettingPage() {
- yTRouter.pushPathByName('SettingPage', '')
- }
- router2SuggestionPage() {
- yTRouter.pushPathByName('SuggestionPage', '')
- }
- router2AgreementPage(param: '关于我们' | '隐私政策' | '用户协议') {
- yTRouter.pushPathByName('AgreementPage', param)
- }
- /**
- * 跳转至用户协议
- */
- router2userAgreement() {
- yTRouter.pushPathByName('UserAgreementPage', '')
- }
- /**
- * 跳转至隐私政策
- */
- router2Privacy() {
- yTRouter.pushPathByName('Privacy', '')
- }
- router2AboutUS() {
- yTRouter.pushPathByName('AboutUS', '')
- }
- getAgreementPageParam() {
- return yTRouter.getParamByName('AgreementPage').pop() as '关于我们' | '隐私政策' | '用户协议'
- }
- router2LoginPage() {
- yTRouter.pushPathByName('LoginPage', '')
- }
- router2DelPhotoPage(param: DelPhotoParam) {
- yTRouter.pushPathByName('DelPhotoPage', param)
- }
- getDelPhotoParam() {
- return yTRouter.getParamByName('DelPhotoPage').pop() as DelPhotoParam
- }
- routerBack() {
- yTRouter.pop()
- }
- }
- export const yTRouter = YTRouter.getInstance()
|