123456789101112131415161718192021222324 |
- import { Component } from '@angular/core';
- import { NavController } from '@ionic/angular';
- import * as Parse from "parse";
- @Component({
- selector: 'app-tabs',
- templateUrl: 'tabs.page.html',
- styleUrls: ['tabs.page.scss']
- })
- export class TabsPage {
- constructor(private navCtrl: NavController) {}
- async checkLogin() {
- const currentUser = Parse.User.current();
- if (currentUser) {
- // 如果已登录,跳转到“我的”界面
- this.navCtrl.navigateForward('/tabs/tab3');
- } else {
- // 如果未登录,跳转到“登录”界面
- this.navCtrl.navigateForward('/tabs/calendar');
- }
- }
- }
|