12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- // import { Component } from '@angular/core';
- // import { AlertController } from '@ionic/angular';
- import { Component, OnInit } from '@angular/core';
- import Swiper from 'swiper';
- import { Router } from '@angular/router';
- @Component({
- selector: 'app-tab1',
- templateUrl: 'tab1.page.html',
- styleUrls: ['tab1.page.scss']
- })
- export class Tab1Page implements OnInit {
- constructor(private router: Router) {}
- navigateToBannerPage(banner: string) {
- // 导航到对应的Banner页面
- console.log('Navigating to Banner page: ' + banner);
- }
- navigateToRecentPage(recent: string) {
- // 导舓到对应的最近更新页面
- console.log('Navigating to Recent page: ' + recent);
- }
- navigateToMoviePage(hotMovie: string) {
- // 导航到对应的电影页面
- console.log('Navigating to Movie page: ' + hotMovie);
- }
- navigateToLocationPage(location: string) {
- // 导航到对应的热门地点页面
- console.log('Navigating to Location page: ' + location);
- }
- navigateToRoutePage(route: string) {
- // 导航到对应的热门路线页面
- console.log('Navigating to Route page: ' + route);
- }
- navigateToCityPage(city: string) {
- // 导航到对应的热门城市页面
- console.log('Navigating to City page: ' + city);
- }
- //点击更多时,默认跳
- navigateToBlankPage() {
- // 导航到空白页面
- console.log('Navigating to Blank page');
- }
- ngOnInit() {
- const swiper = new Swiper('.swiper-container', {
- loop: true,
- pagination: {
- el: '.swiper-pagination',
- clickable: true,
- },
- autoplay: {
- delay: 2000, // 设置轮播时间为2秒
- },
- speed: 1000, // 设置过渡速度为1000ms
- });
- }
- }
|