12345678910111213141516171819202122232425 |
- import { Component } from '@angular/core';
- import { Router } from '@angular/router';
- @Component({
- selector: 'app-tab2',
- templateUrl: 'tab2.page.html',
- styleUrls: ['tab2.page.scss']
- })
- export class Tab2Page {
- constructor(private router: Router) {}
- goToGame() {
- this.router.navigate(['/game']); // 导航到游戏页面,假设游戏页面路由为 '/game'
- }
- watchVideo() {
- window.open('https://www.douyin.com/?recommend=1', '_blank'); // 在新标签页中打开指定网站
- }
- goToFriend() {
- this.router.navigate(['/friend']); // 导航到知己页面,假设知己页面路由为 '/friend'
- }
- }
|