Browse Source

上传文件至 ''

0225221 7 months ago
parent
commit
dce50c5ce4
5 changed files with 213 additions and 0 deletions
  1. 31 0
      tab1.module.ts
  2. 79 0
      tab1.page.html
  3. 25 0
      tab1.page.scss
  4. 26 0
      tab1.page.spec.ts
  5. 52 0
      tab1.page.ts

+ 31 - 0
tab1.module.ts

@@ -0,0 +1,31 @@
+import { IonicModule } from '@ionic/angular';
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import { Tab1Page } from './tab1.page';
+// import { ReportCardComponent } from '../report-card/report-card.component';
+import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
+
+import { Tab1PageRoutingModule } from './tab1-routing.module';
+
+
+@NgModule({
+  imports: [
+    
+    IonicModule,
+    CommonModule,
+    FormsModule,
+    ExploreContainerComponentModule,
+    Tab1PageRoutingModule,
+    // ReportCardComponent 
+    
+  ],
+  declarations: [Tab1Page]
+})
+
+export class Tab1PageModule {
+  
+}
+
+
+

+ 79 - 0
tab1.page.html

@@ -0,0 +1,79 @@
+<ion-header>
+  <ion-toolbar>
+      <ion-buttons slot="start">
+        <ion-button expand="full" (click)="goToNewPage()">
+          <ion-icon name="person-circle" ></ion-icon>
+          登录
+        </ion-button>
+        <ion-button expand="full" (click)="goTocommunity()" style="margin-right: 50px;">
+          <ion-icon name="home" ></ion-icon>
+          社区
+        </ion-button>
+      </ion-buttons>
+  </ion-toolbar>
+</ion-header>
+
+  <ion-card  style="background-color: #68a0e4;">
+    <ion-card-content>
+      <ion-grid style="margin: left 500px ;">
+        <ion-row justify-content-around>
+          <ion-col>
+            <ion-icon name="newspaper"></ion-icon>
+            <p>资讯</p>
+          </ion-col>
+          <ion-col>
+            <ion-icon name="briefcase"></ion-icon>
+            <p>生涯</p>
+          </ion-col>
+          <ion-col>
+            <ion-icon name="videocam"></ion-icon>
+            <p>直播</p>
+          </ion-col>
+          <ion-col>
+            <ion-icon name="podium"></ion-icon>
+            <p>排行</p>
+          </ion-col>
+          <ion-col>
+            <ion-icon name="book"></ion-icon>
+            <p>百科</p>
+          </ion-col>
+          
+          
+        
+        </ion-row>
+      </ion-grid>
+    </ion-card-content>
+  </ion-card>  
+
+  <div class="sou">
+    <ion-searchbar [(ngModel)]="searchQuery" (ionChange)="search()"></ion-searchbar>
+     <ion-list *ngIf="showResults">
+      <ion-item *ngFor="let result of filteredResults">
+        {{ result }}
+      </ion-item>
+      </ion-list>
+  </div>
+
+  <ion-content>
+    <div class="text">
+      本周快讯:沙特杯联盟赛事总决赛T1 3:1 Tes,LPL再次被Faker大魔王击碎。
+    </div>
+    <img src="assets/img/b.png" style="width: max-content; height: auto;margin-left: 200px;"  alt="">
+</ion-content>
+
+
+<ion-content style="color: #68a0e4;">
+  <ion-card *ngFor="let report of reports">
+    <ion-card-header>
+      <ion-card-title>{{report.title}}</ion-card-title>
+    </ion-card-header>
+    <ion-card-content>
+      {{report.content}}
+    </ion-card-content>
+  </ion-card>
+</ion-content>
+
+
+
+
+

+ 25 - 0
tab1.page.scss

@@ -0,0 +1,25 @@
+.text {
+    color:brown;
+    font-weight: bold; /* 设置字体加粗 */
+    font-style: italic; /* 设置字体斜体 */
+    font-size: 30px; /* 设置字体大小为 30px */
+    text-align: center; /* 文字居中 */
+}
+.sou {
+  display: flex;
+  margin-top: 0px; /* 顶部外边距 */
+  margin-left: 300px; /* 左侧外边距 */
+  width:800px;
+}
+.report1{
+  display: flex;
+  color: aqua;
+}
+.custom-content {
+  margin-top: 50px;
+}
+
+
+
+
+  

+ 26 - 0
tab1.page.spec.ts

@@ -0,0 +1,26 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { IonicModule } from '@ionic/angular';
+
+import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
+
+import { Tab1Page } from './tab1.page';
+
+describe('Tab1Page', () => {
+  let component: Tab1Page;
+  let fixture: ComponentFixture<Tab1Page>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      declarations: [Tab1Page],
+      imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(Tab1Page);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 52 - 0
tab1.page.ts

@@ -0,0 +1,52 @@
+import { Component } from '@angular/core';
+import { Router } from '@angular/router';
+@Component({
+  selector: 'app-tab1',
+  templateUrl: 'tab1.page.html',
+  styleUrls: ['tab1.page.scss']
+})
+export class Tab1Page {
+  searchQuery: string='';
+  searchResults: string[] = ['探索星球', '探索轨迹', '探索资源', '探索敌人信息'];
+  filteredResults: string[] = [];
+  showResults: boolean = false;
+constructor(private router: Router) {}
+goTocommunity()
+  {
+    this.router.navigate(['/community'])
+  }
+
+  goToNewPage() 
+{
+  this.router.navigate(['/login']);
+}
+search() {
+      this.filteredResults = this.searchResults.filter(result =>
+        result.toLowerCase().includes(this.searchQuery.toLowerCase())
+      );
+  
+      if (this.searchQuery && this.searchQuery.trim() !== '' && this.filteredResults.length > 0) {
+        this.showResults = true;
+      } else {
+        this.showResults = false;
+      }
+    }
+
+  
+  reports: Report[] = [
+    { id: 1, title: '报告标题1', content: '这是报告内容1' },
+    { id: 2, title: '报告标题2', content: '这是报告内容2' },
+    { id: 3, title: '报告标题3', content: '这是报告内容3' },
+  ];
+ 
+
+
+}
+export interface Report {
+  id: number;
+  title: string;
+  content: string;
+}
+
+
+