0224995 преди 2 месеца
родител
ревизия
2c71ca5d9d
променени са 66 файла, в които са добавени 1436 реда и са изтрити 0 реда
  1. 8 0
      README.md
  2. BIN
      assets/中国近代名家名作宝库.jpg
  3. BIN
      assets/微信图片_20240704193342.jpg
  4. BIN
      assets/微信图片_20240705155301.jpg
  5. 24 0
      src/app/app-routing.module.ts
  6. 3 0
      src/app/app.component.html
  7. 0 0
      src/app/app.component.scss
  8. 21 0
      src/app/app.component.spec.ts
  9. 10 0
      src/app/app.component.ts
  10. 16 0
      src/app/app.module.ts
  11. 17 0
      src/app/borrow/borrow-routing.module.ts
  12. 20 0
      src/app/borrow/borrow.module.ts
  13. 90 0
      src/app/borrow/borrow.page.html
  14. 16 0
      src/app/borrow/borrow.page.scss
  15. 17 0
      src/app/borrow/borrow.page.spec.ts
  16. 59 0
      src/app/borrow/borrow.page.ts
  17. 4 0
      src/app/explore-container/explore-container.component.html
  18. 27 0
      src/app/explore-container/explore-container.component.scss
  19. 24 0
      src/app/explore-container/explore-container.component.spec.ts
  20. 12 0
      src/app/explore-container/explore-container.component.ts
  21. 14 0
      src/app/explore-container/explore-container.module.ts
  22. 17 0
      src/app/request/request-routing.module.ts
  23. 20 0
      src/app/request/request.module.ts
  24. 91 0
      src/app/request/request.page.html
  25. 43 0
      src/app/request/request.page.scss
  26. 17 0
      src/app/request/request.page.spec.ts
  27. 59 0
      src/app/request/request.page.ts
  28. 16 0
      src/app/tab1/tab1-routing.module.ts
  29. 20 0
      src/app/tab1/tab1.module.ts
  30. 17 0
      src/app/tab1/tab1.page.html
  31. 0 0
      src/app/tab1/tab1.page.scss
  32. 26 0
      src/app/tab1/tab1.page.spec.ts
  33. 12 0
      src/app/tab1/tab1.page.ts
  34. 16 0
      src/app/tab2/tab2-routing.module.ts
  35. 20 0
      src/app/tab2/tab2.module.ts
  36. 98 0
      src/app/tab2/tab2.page.html
  37. 23 0
      src/app/tab2/tab2.page.scss
  38. 26 0
      src/app/tab2/tab2.page.spec.ts
  39. 46 0
      src/app/tab2/tab2.page.ts
  40. 16 0
      src/app/tab3/tab3-routing.module.ts
  41. 20 0
      src/app/tab3/tab3.module.ts
  42. 105 0
      src/app/tab3/tab3.page.html
  43. 17 0
      src/app/tab3/tab3.page.scss
  44. 26 0
      src/app/tab3/tab3.page.spec.ts
  45. 12 0
      src/app/tab3/tab3.page.ts
  46. 39 0
      src/app/tabs/tabs-routing.module.ts
  47. 19 0
      src/app/tabs/tabs.module.ts
  48. 20 0
      src/app/tabs/tabs.page.html
  49. 1 0
      src/app/tabs/tabs.page.scss
  50. 26 0
      src/app/tabs/tabs.page.spec.ts
  51. 12 0
      src/app/tabs/tabs.page.ts
  52. BIN
      src/assets/icon/favicon.png
  53. 1 0
      src/assets/shapes.svg
  54. BIN
      src/assets/touxiang.png
  55. BIN
      src/assets/中国近代名家名作宝库.jpg
  56. BIN
      src/assets/在家过把“克隆”隐.jpg
  57. BIN
      src/assets/音乐会曲.jpg
  58. 3 0
      src/environments/environment.prod.ts
  59. 16 0
      src/environments/environment.ts
  60. 45 0
      src/global.scss
  61. 26 0
      src/index.html
  62. 6 0
      src/main.ts
  63. 55 0
      src/polyfills.ts
  64. 14 0
      src/test.ts
  65. 2 0
      src/theme/variables.scss
  66. 6 0
      src/zone-flags.ts

+ 8 - 0
README.md

@@ -221,11 +221,19 @@
 ## 各页面对标竞品截图梳理
 * 首页页面对标 
 ![](./assets/微信图片_20240704193342.jpg)
+
 * 图书详情页面对标 
+
 ![](./assets/微信图片_20240704193453.jpg)
+
 ![](./assets/微信图片_20240704193454.jpg)
+
 * 我的请求页面对标 
+
 ![](./assets/微信图片_20240704201751.jpg)
+
 ![](./assets/微信图片_202407042017511.jpg)
+
 * 个人信息页面对标
+
 ![](./assets/微信图片_20240704221707.jpg)

BIN
assets/中国近代名家名作宝库.jpg


BIN
assets/微信图片_20240704193342.jpg


BIN
assets/微信图片_20240705155301.jpg


+ 24 - 0
src/app/app-routing.module.ts

@@ -0,0 +1,24 @@
+import { NgModule } from '@angular/core';
+import { PreloadAllModules, RouterModule, Routes } from '@angular/router';
+
+const routes: Routes = [
+  {
+    path: '',
+    loadChildren: () => import('./tabs/tabs.module').then(m => m.TabsPageModule)
+  },
+  {
+    path: 'request',
+    loadChildren: () => import('./request/request.module').then( m => m.RequestPageModule)
+  },
+  {
+    path: 'borrow',
+    loadChildren: () => import('./borrow/borrow.module').then( m => m.BorrowPageModule)
+  }
+];
+@NgModule({
+  imports: [
+    RouterModule.forRoot(routes, { preloadingStrategy: PreloadAllModules })
+  ],
+  exports: [RouterModule]
+})
+export class AppRoutingModule {}

+ 3 - 0
src/app/app.component.html

@@ -0,0 +1,3 @@
+<ion-app>
+  <ion-router-outlet></ion-router-outlet>
+</ion-app>

+ 0 - 0
src/app/app.component.scss


+ 21 - 0
src/app/app.component.spec.ts

@@ -0,0 +1,21 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { TestBed } from '@angular/core/testing';
+
+import { AppComponent } from './app.component';
+
+describe('AppComponent', () => {
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      declarations: [AppComponent],
+      schemas: [CUSTOM_ELEMENTS_SCHEMA],
+    }).compileComponents();
+  });
+
+  it('should create the app', () => {
+    const fixture = TestBed.createComponent(AppComponent);
+    const app = fixture.componentInstance;
+    expect(app).toBeTruthy();
+  });
+
+});

+ 10 - 0
src/app/app.component.ts

@@ -0,0 +1,10 @@
+import { Component } from '@angular/core';
+
+@Component({
+  selector: 'app-root',
+  templateUrl: 'app.component.html',
+  styleUrls: ['app.component.scss'],
+})
+export class AppComponent {
+  constructor() {}
+}

+ 16 - 0
src/app/app.module.ts

@@ -0,0 +1,16 @@
+import { NgModule } from '@angular/core';
+import { BrowserModule } from '@angular/platform-browser';
+import { RouteReuseStrategy } from '@angular/router';
+
+import { IonicModule, IonicRouteStrategy } from '@ionic/angular';
+
+import { AppRoutingModule } from './app-routing.module';
+import { AppComponent } from './app.component';
+
+@NgModule({
+  declarations: [AppComponent],
+  imports: [BrowserModule, IonicModule.forRoot(), AppRoutingModule],
+  providers: [{ provide: RouteReuseStrategy, useClass: IonicRouteStrategy }],
+  bootstrap: [AppComponent],
+})
+export class AppModule {}

+ 17 - 0
src/app/borrow/borrow-routing.module.ts

@@ -0,0 +1,17 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+
+import { BorrowPage } from './borrow.page';
+
+const routes: Routes = [
+  {
+    path: '',
+    component: BorrowPage
+  }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class BorrowPageRoutingModule {}

+ 20 - 0
src/app/borrow/borrow.module.ts

@@ -0,0 +1,20 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+
+import { IonicModule } from '@ionic/angular';
+
+import { BorrowPageRoutingModule } from './borrow-routing.module';
+
+import { BorrowPage } from './borrow.page';
+
+@NgModule({
+  imports: [
+    CommonModule,
+    FormsModule,
+    IonicModule,
+    BorrowPageRoutingModule
+  ],
+  declarations: [BorrowPage]
+})
+export class BorrowPageModule {}

+ 90 - 0
src/app/borrow/borrow.page.html

@@ -0,0 +1,90 @@
+<ion-header>
+  <ion-toolbar>
+    <ion-buttons slot="start">
+      <ion-back-button></ion-back-button>
+    </ion-buttons>
+    <ion-title>我的借阅</ion-title>
+  </ion-toolbar>
+</ion-header>
+<ion-header>
+  <ion-toolbar>
+    <ion-segment [(ngModel)]="segment">
+      <ion-segment-button value="current">当前借阅</ion-segment-button>
+      <ion-segment-button value="history">借阅历史</ion-segment-button>
+    </ion-segment>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content>
+  <ion-card *ngIf="segment === 'current'">
+    <ion-item lines="full" style="display: flex; justify-content: space-between;">
+    <ion-label>
+      当前共借阅{{ currentCount }}本书
+    </ion-label>
+    <div style="display: flex; align-items: center;">
+      <ion-icon name="search" style="margin-right: 10px;"></ion-icon>
+      <span>检索</span>
+    </div>
+    <div style="display: flex; align-items: center;">
+      <ion-icon name="filter" style="margin-right: 10px;margin-left: 20px;"></ion-icon>
+      <span>筛选</span>
+    </div>
+    </ion-item>
+    <ion-card-content>
+      <p *ngIf="currentCount === 0">您当前还没有借阅记录哦!</p>
+      <ion-card *ngFor="let card of currentBooks">
+        <ion-card-content>
+          <ion-checkbox slot="start" (ionChange)="selectCard(card)" class="checkbox"></ion-checkbox>
+          <ion-card-header>
+            {{ card.title }}
+          </ion-card-header>
+          <ion-card-content>
+            {{ card.author }}
+          </ion-card-content>
+        </ion-card-content>
+      </ion-card>
+
+    </ion-card-content>
+  </ion-card>
+  <ion-footer style="position: fixed; bottom: 0; left: 0; right: 0;">
+    <div class="button-container">
+      <ion-button *ngIf="segment === 'current'" id="present-alert" style="width: 400px;" expand="full" [disabled]="!isAnyCardSelected()">续借</ion-button>
+      <ion-alert
+        trigger="present-alert"
+        header="请输入续借天数"
+        [buttons]="alertButtons"
+        [inputs]="alertInputs"
+        (ionAlertDidDismiss)="onAlertDismiss($event)">
+      </ion-alert>
+    </div>
+  </ion-footer>
+  <ion-card *ngIf="segment === 'history'">
+    <ion-item lines="full" style="display: flex; justify-content: space-between;">
+      <ion-label>
+        共借阅{{ historyCount }}本书
+      </ion-label>
+      <div style="display: flex; align-items: center;">
+        <ion-icon name="search" style="margin-right: 10px;"></ion-icon>
+        <span>检索</span>
+      </div>
+      <div style="display: flex; align-items: center;">
+        <ion-icon name="filter" style="margin-right: 10px;margin-left: 20px;"></ion-icon>
+        <span>筛选</span>
+      </div>
+      </ion-item>
+    <ion-card-content>
+      <p *ngIf="historyCount === 0">您当前还没有历史记录哦!</p>
+      <ion-card *ngFor="let history of historyBooks">
+        <ion-card-content>
+          <!-- <ion-checkbox slot="start" (ionChange)="selectCard(history)" class="checkbox"></ion-checkbox> -->
+          <ion-card-header>
+            {{ history.title }}
+          </ion-card-header>
+          <ion-card-content>
+            {{ history.author }}
+          </ion-card-content>
+        </ion-card-content>
+      </ion-card>
+    </ion-card-content>
+  </ion-card>
+</ion-content>

+ 16 - 0
src/app/borrow/borrow.page.scss

@@ -0,0 +1,16 @@
+ion-back-button::part(text) {
+    display: none;
+  }
+  .button-container {
+    display: flex;
+    justify-content: space-around;
+  }
+  .checkbox {
+    position: absolute;
+    top: 50%;
+    left: 10px; 
+    transform: translateY(-50%);
+  }
+ion-card {
+  background-color: #FFF8DC; /* 设置浅黄色卡片背景色 */
+}

+ 17 - 0
src/app/borrow/borrow.page.spec.ts

@@ -0,0 +1,17 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { BorrowPage } from './borrow.page';
+
+describe('BorrowPage', () => {
+  let component: BorrowPage;
+  let fixture: ComponentFixture<BorrowPage>;
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(BorrowPage);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 59 - 0
src/app/borrow/borrow.page.ts

@@ -0,0 +1,59 @@
+import { Component, OnInit } from '@angular/core';
+
+@Component({
+  selector: 'app-borrow',
+  templateUrl: './borrow.page.html',
+  styleUrls: ['./borrow.page.scss'],
+})
+export class BorrowPage implements OnInit {
+  segment: string = 'current';
+  currentCount: number = 0;
+  historyCount: number = 0;
+  currentBooks: any[] = [];
+  historyBooks: any[] = [];
+  constructor() {
+    // 模拟数据
+    this.currentBooks = [
+      { title: 'Book A', author: 'Author A', selected: false },
+      { title: 'Book B', author: 'Author B', selected: false }
+    ];
+    this.historyBooks = [
+      { title: 'Book C', author: 'Author C' },
+      { title: 'Book D', author: 'Author D' }
+    ];
+
+    this.currentCount = this.currentBooks.length;
+    this.historyCount = this.historyBooks.length;
+  }
+  isAnyCardSelected(): boolean {
+    return this.currentBooks.some((book) => book.selected);
+  }
+  
+  public alertButtons = [{text:'确定',role:'ok',}];
+  public alertInputs = [
+    {
+      type: 'number',
+      placeholder: '请输入续借天数',
+      min: 1,
+      max: 30,
+    },
+  ];
+  onAlertDismiss(event:any) {
+    if (event.detail.role === 'ok') {
+      // 取消复选框的选中状态
+      this.currentBooks.forEach((book) => {
+        book.selected = false;
+      });
+      // 将续借按钮设为灰色
+      const renewButton = document.getElementById('present-alert');
+      if (renewButton) {
+        renewButton.setAttribute('disabled', 'true');
+      }
+    }
+  }
+  ngOnInit() {
+  }
+  selectCard(card: any) {
+    card.selected = !card.selected;
+  }
+}

+ 4 - 0
src/app/explore-container/explore-container.component.html

@@ -0,0 +1,4 @@
+<div id="container">
+  <strong>{{ name }}</strong>
+  <p>Explore <a target="_blank" rel="noopener noreferrer" href="https://ionicframework.com/docs/components">UI Components</a></p>
+</div>

+ 27 - 0
src/app/explore-container/explore-container.component.scss

@@ -0,0 +1,27 @@
+#container {
+  text-align: center;
+
+  position: absolute;
+  left: 0;
+  right: 0;
+  top: 50%;
+  transform: translateY(-50%);
+}
+
+#container strong {
+  font-size: 20px;
+  line-height: 26px;
+}
+
+#container p {
+  font-size: 16px;
+  line-height: 22px;
+
+  color: #8c8c8c;
+
+  margin: 0;
+}
+
+#container a {
+  text-decoration: none;
+}

+ 24 - 0
src/app/explore-container/explore-container.component.spec.ts

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

+ 12 - 0
src/app/explore-container/explore-container.component.ts

@@ -0,0 +1,12 @@
+import { Component, Input } from '@angular/core';
+
+@Component({
+  selector: 'app-explore-container',
+  templateUrl: './explore-container.component.html',
+  styleUrls: ['./explore-container.component.scss'],
+})
+export class ExploreContainerComponent {
+
+  @Input() name?: string;
+
+}

+ 14 - 0
src/app/explore-container/explore-container.module.ts

@@ -0,0 +1,14 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+
+import { IonicModule } from '@ionic/angular';
+
+import { ExploreContainerComponent } from './explore-container.component';
+
+@NgModule({
+  imports: [ CommonModule, FormsModule, IonicModule],
+  declarations: [ExploreContainerComponent],
+  exports: [ExploreContainerComponent]
+})
+export class ExploreContainerComponentModule {}

+ 17 - 0
src/app/request/request-routing.module.ts

@@ -0,0 +1,17 @@
+import { NgModule } from '@angular/core';
+import { Routes, RouterModule } from '@angular/router';
+
+import { RequestPage } from './request.page';
+
+const routes: Routes = [
+  {
+    path: '',
+    component: RequestPage
+  }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule],
+})
+export class RequestPageRoutingModule {}

+ 20 - 0
src/app/request/request.module.ts

@@ -0,0 +1,20 @@
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+
+import { IonicModule } from '@ionic/angular';
+
+import { RequestPageRoutingModule } from './request-routing.module';
+
+import { RequestPage } from './request.page';
+
+@NgModule({
+  imports: [
+    CommonModule,
+    FormsModule,
+    IonicModule,
+    RequestPageRoutingModule
+  ],
+  declarations: [RequestPage]
+})
+export class RequestPageModule {}

+ 91 - 0
src/app/request/request.page.html

@@ -0,0 +1,91 @@
+<!-- <ion-header [translucent]="true">
+  <ion-toolbar>
+    <ion-title>request</ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content [fullscreen]="true">
+  <ion-header collapse="condense">
+    <ion-toolbar>
+      <ion-title size="large">我的请求</ion-title>
+    </ion-toolbar>
+  </ion-header>
+</ion-content> -->
+<ion-header>
+  <ion-toolbar>
+    <ion-buttons slot="start">
+      <ion-back-button></ion-back-button>
+    </ion-buttons>
+    <ion-title>我的请求</ion-title>
+  </ion-toolbar>
+</ion-header>
+<!-- <ion-content>
+  <ion-card>
+    <ion-card-content>
+      <ion-item lines="none">
+        <div class="touxiang">
+          <ion-avatar slot="start">
+            <img src="assets/touxiang.png">
+          </ion-avatar>
+        </div>
+        <ion-label>
+          <h2>用户名</h2>
+          <p>手机号</p>
+        </ion-label>
+      </ion-item>
+    </ion-card-content>
+  </ion-card>
+</ion-content> -->
+
+<ion-content class="ion-padding">
+  
+  <div class="book-info">
+    <img src="assets/音乐会曲.jpg" alt="Book Image">
+    <div class="book-details">
+      <h2>书名</h2>
+      <p class="author">作者</p>
+      <p class="publisher">出版社</p>
+      <p>其他图书信息</p>
+    </div>
+  </div>
+
+  <ion-card class="full-width-card">
+  <div class="user-info">
+    <ion-item lines="full">
+      <ion-label style="font-size: 20px;">基本信息</ion-label>
+    </ion-item>
+    <ion-item>
+      <ion-label>收件人</ion-label>
+      <ion-input type="text" placeholder="请输入收件人" slot="end" style="text-align: right;"></ion-input>
+    </ion-item>
+
+    <ion-item>
+      <ion-label>地址</ion-label>
+      <ion-input type="text" placeholder="请输入取书地" slot="end" style="text-align: right;"></ion-input>
+    </ion-item>
+
+    <ion-item>
+      <ion-label>手机号码</ion-label>
+      <ion-input type="tel" placeholder="请输入手机号码" slot="end" style="text-align: right;"></ion-input>
+    </ion-item>
+
+    <ion-item lines="none">
+      <ion-label>备注</ion-label>
+    </ion-item>
+    
+    <ion-item lines="none">
+      <ion-card color="light" style="margin-left: 0px;margin-top: 0px;width: 100%;">
+        <ion-textarea placeholder="备注" (input)="updateCharacterCount($event)"></ion-textarea>
+        <div class="character-count">0/50</div>
+      </ion-card>
+    </ion-item>
+  </div>
+  </ion-card>
+  <!-- <ion-button expand="block" color="success" (click)="submitOrder()">提交订单</ion-button> -->
+  <ion-button id="present-alert" expand="block" color="success">提交订单</ion-button>
+  <ion-alert
+    trigger="present-alert"
+    header="确认订单!"
+    [buttons]="alertButtons">
+  </ion-alert>
+</ion-content>

+ 43 - 0
src/app/request/request.page.scss

@@ -0,0 +1,43 @@
+.book-info {
+    display: flex;
+    align-items: center;
+    margin-bottom: 20px;
+    margin-left: 15px; 
+  }
+  
+  .book-info img {
+    width: 100px;
+    height: auto;
+    margin-right: 20px;
+  }
+  
+  .book-details h2 {
+    font-size: 20px;
+  }
+  
+  .book-details .author, .book-details .publisher {
+    font-size: 10px;
+  }
+
+  // .user-info ion-item {
+  //   margin-bottom: 0px;
+  // }
+  
+  .user-info ion-label {
+    font-size: 18px;
+  }
+
+  .user-info ion-input, .user-info ion-textarea {
+    font-size: 14px;
+  }
+  .character-count {
+    text-align: right;
+    color: gray;
+    font-size: 12px;
+  }
+  ion-button {
+    margin-top: 20px;
+  }
+  ion-back-button::part(text) {
+    display: none;
+  }

+ 17 - 0
src/app/request/request.page.spec.ts

@@ -0,0 +1,17 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+import { RequestPage } from './request.page';
+
+describe('RequestPage', () => {
+  let component: RequestPage;
+  let fixture: ComponentFixture<RequestPage>;
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(RequestPage);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 59 - 0
src/app/request/request.page.ts

@@ -0,0 +1,59 @@
+import { Component, OnInit } from '@angular/core';
+import { ToastController } from '@ionic/angular';
+import { Router } from '@angular/router';
+
+@Component({
+  selector: 'app-request',
+  templateUrl: './request.page.html',
+  styleUrls: ['./request.page.scss'],
+})
+export class RequestPage implements OnInit {
+  constructor(private toastController: ToastController,private router:Router) {}
+  ngOnInit() {
+  }
+
+  public alertButtons = [
+    {
+      text: '取消',
+      role: 'cancel',
+      // handler: () => {
+      //   console.log('Alert canceled');
+      // },
+    },
+    {
+      text: '确定',
+      role: 'confirm',
+      handler: () => {
+        this.router.navigate(['/tabs/tab2']);
+      },
+    },
+  ];
+
+
+  async presentToast() {
+    const toast = await this.toastController.create({
+      message: '已超过最大字数限制',
+      duration: 1000, // 显示时长为1秒
+      position: 'middle', // 在页面中部显示
+      cssClass: 'toast-center'
+    });
+    toast.present();
+  }
+  updateCharacterCount(event: any) {
+    const maxLength = 50;
+    let currentLength = event.target.value.length; 
+  
+    const characterCountElement = document.querySelector('.character-count');
+
+    if (characterCountElement) {
+      characterCountElement.textContent = currentLength;
+    }
+
+    if (currentLength > maxLength) {
+      this.presentToast();
+      const trimmedValue = event.target.value.substring(0, maxLength);
+      event.target.value = trimmedValue;
+      currentLength = maxLength;
+    }
+  }
+}

+ 16 - 0
src/app/tab1/tab1-routing.module.ts

@@ -0,0 +1,16 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { Tab1Page } from './tab1.page';
+
+const routes: Routes = [
+  {
+    path: '',
+    component: Tab1Page,
+  }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class Tab1PageRoutingModule {}

+ 20 - 0
src/app/tab1/tab1.module.ts

@@ -0,0 +1,20 @@
+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 { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
+
+import { Tab1PageRoutingModule } from './tab1-routing.module';
+
+@NgModule({
+  imports: [
+    IonicModule,
+    CommonModule,
+    FormsModule,
+    ExploreContainerComponentModule,
+    Tab1PageRoutingModule
+  ],
+  declarations: [Tab1Page]
+})
+export class Tab1PageModule {}

+ 17 - 0
src/app/tab1/tab1.page.html

@@ -0,0 +1,17 @@
+<ion-header [translucent]="true">
+  <ion-toolbar>
+    <ion-title>
+      Tab 1
+    </ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content [fullscreen]="true">
+  <ion-header collapse="condense">
+    <ion-toolbar>
+      <ion-title size="large">Tab 1</ion-title>
+    </ion-toolbar>
+  </ion-header>
+
+  <app-explore-container name="Tab 1 page"></app-explore-container>
+</ion-content>

+ 0 - 0
src/app/tab1/tab1.page.scss


+ 26 - 0
src/app/tab1/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();
+  });
+});

+ 12 - 0
src/app/tab1/tab1.page.ts

@@ -0,0 +1,12 @@
+import { Component } from '@angular/core';
+
+@Component({
+  selector: 'app-tab1',
+  templateUrl: 'tab1.page.html',
+  styleUrls: ['tab1.page.scss']
+})
+export class Tab1Page {
+
+  constructor() {}
+
+}

+ 16 - 0
src/app/tab2/tab2-routing.module.ts

@@ -0,0 +1,16 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { Tab2Page } from './tab2.page';
+
+const routes: Routes = [
+  {
+    path: '',
+    component: Tab2Page,
+  }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class Tab2PageRoutingModule {}

+ 20 - 0
src/app/tab2/tab2.module.ts

@@ -0,0 +1,20 @@
+import { IonicModule } from '@ionic/angular';
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import { Tab2Page } from './tab2.page';
+import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
+
+import { Tab2PageRoutingModule } from './tab2-routing.module';
+
+@NgModule({
+  imports: [
+    IonicModule,
+    CommonModule,
+    FormsModule,
+    ExploreContainerComponentModule,
+    Tab2PageRoutingModule
+  ],
+  declarations: [Tab2Page]
+})
+export class Tab2PageModule {}

+ 98 - 0
src/app/tab2/tab2.page.html

@@ -0,0 +1,98 @@
+<!-- <ion-header [translucent]="true">
+  <ion-toolbar>
+    <ion-title>
+      Tab 2
+    </ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content [fullscreen]="true">
+  <ion-header collapse="condense">
+    <ion-toolbar>
+      <ion-title size="large">Tab 2</ion-title>
+    </ion-toolbar>
+  </ion-header>
+
+  <app-explore-container name="Tab 2 page"></app-explore-container>
+</ion-content> -->
+<ion-header>
+  <ion-toolbar>
+    <ion-title>首页</ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content>
+  <!-- 顶部搜索框 -->
+  <ion-searchbar></ion-searchbar>
+
+  <div class="button-container">
+    <div class="button" (click)="onClickUser($event)">
+      <ion-icon name="person"></ion-icon>
+      <span>个人信息</span>
+    </div>
+    <div class="button" (click)="onClickBorrow($event)">
+      <ion-icon name="book"></ion-icon>
+      <span>我的借阅</span>
+    </div>
+    <div class="button">
+      <ion-icon name="podium"></ion-icon>
+      <span>排行榜</span>
+    </div>
+    <div class="button">
+      <ion-icon name="add-circle"></ion-icon>
+      <span>新书通报</span>
+    </div>
+    <div class="button">
+      <ion-icon name="cloud-download"></ion-icon>
+      <span>资源荐购</span>
+    </div>
+  </div>
+  
+  <div class="button-container">
+    <div class="button">
+      <ion-icon name="list"></ion-icon>
+      <span>书单</span>
+    </div>
+    <div class="button">
+      <ion-icon name="albums"></ion-icon>
+      <span>专题</span>
+    </div>
+    <div class="button" (click)="onClick($event)">
+      <ion-icon name="chatbox-ellipses"></ion-icon>
+      <span>我的请求</span>
+    </div>
+    <div class="button">
+      <ion-icon name="folder"></ion-icon>
+      <span>分类浏览</span>
+    </div>
+    <div class="button">
+      <ion-icon name="library"></ion-icon>
+      <span>数据库导航</span>
+    </div>
+  </div>
+
+  <!-- 底部热读推荐 -->
+  <ion-card>
+    <ion-card-header>
+      <ion-card-title>热读推荐</ion-card-title>
+    </ion-card-header>
+    <ion-card-content>
+      <!-- 图书列表 -->
+      <ion-list>
+        <ion-item *ngFor="let book of books">
+          <ion-thumbnail slot="start">
+            <img [src]="book.imageUrl">
+          </ion-thumbnail>
+          <ion-label>
+            <h2>{{book.title}}</h2>
+            <p>{{book.author}}</p>
+            <p>{{book.publisher}}</p>
+            <p>{{book.isbn}}</p>
+            <!-- 其他图书信息 -->
+          </ion-label>
+        </ion-item>
+      </ion-list>
+      <ion-button expand="full">更多</ion-button>
+    </ion-card-content>
+  </ion-card>
+</ion-content>

+ 23 - 0
src/app/tab2/tab2.page.scss

@@ -0,0 +1,23 @@
+.button-container {
+    display: flex;
+    flex-wrap: wrap;
+  }
+  
+  .button {
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    flex: 1;
+    padding: 10px;
+    color: #edb98b;
+  }
+  
+  ion-icon {
+    font-size: 30px;
+  }
+  
+  span {
+    margin-top: 5px;
+    text-align: center;
+    font-size: 14px;
+  }

+ 26 - 0
src/app/tab2/tab2.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 { Tab2Page } from './tab2.page';
+
+describe('Tab2Page', () => {
+  let component: Tab2Page;
+  let fixture: ComponentFixture<Tab2Page>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      declarations: [Tab2Page],
+      imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(Tab2Page);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 46 - 0
src/app/tab2/tab2.page.ts

@@ -0,0 +1,46 @@
+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) {}
+  books: any[] = [
+    {
+      title: '中国近代名家名作宝库',
+      author: '周松平主编',
+      isbn: '7-204-05471-7',
+      publisher: '内蒙古人民出版社',
+      imageUrl: 'assets/中国近代名家名作宝库.jpg',
+      // 其他图书信息
+    },
+    {
+      title: '在家过把“克隆”隐',
+      author: '陈颖著',
+      isbn: '7-5048-3253-7',
+      publisher: '农村读物出版社',
+      imageUrl: 'assets/在家过把“克隆”隐.jpg',
+      // 其他图书信息
+    },
+    {
+      title: '音乐会曲',
+      author: '欣德米特',
+      isbn: '7-5404-3220-9',
+      publisher: '湖南文艺出版社',
+      imageUrl: 'assets/音乐会曲.jpg',
+    }
+    // 其他示例图书数据
+  ];
+  onClick(event:MouseEvent){
+    this.router.navigate(['request']);//  /tabs/tab3
+  }
+  onClickUser(event:MouseEvent){
+    this.router.navigate(['/tabs/tab3']);
+  }
+  onClickBorrow(event:MouseEvent){
+    this.router.navigate(['borrow']);
+  }
+}

+ 16 - 0
src/app/tab3/tab3-routing.module.ts

@@ -0,0 +1,16 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { Tab3Page } from './tab3.page';
+
+const routes: Routes = [
+  {
+    path: '',
+    component: Tab3Page,
+  }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+  exports: [RouterModule]
+})
+export class Tab3PageRoutingModule {}

+ 20 - 0
src/app/tab3/tab3.module.ts

@@ -0,0 +1,20 @@
+import { IonicModule } from '@ionic/angular';
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+import { Tab3Page } from './tab3.page';
+import { ExploreContainerComponentModule } from '../explore-container/explore-container.module';
+
+import { Tab3PageRoutingModule } from './tab3-routing.module';
+
+@NgModule({
+  imports: [
+    IonicModule,
+    CommonModule,
+    FormsModule,
+    ExploreContainerComponentModule,
+    Tab3PageRoutingModule
+  ],
+  declarations: [Tab3Page]
+})
+export class Tab3PageModule {}

+ 105 - 0
src/app/tab3/tab3.page.html

@@ -0,0 +1,105 @@
+<!-- <ion-header [translucent]="true">
+  <ion-toolbar>
+    <ion-title>
+      Tab 3
+    </ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content [fullscreen]="true">
+  <ion-header collapse="condense">
+    <ion-toolbar>
+      <ion-title size="large">Tab 3</ion-title>
+    </ion-toolbar>
+  </ion-header>
+
+  <app-explore-container name="Tab 3 page"></app-explore-container>
+</ion-content> -->
+<ion-header>
+  <ion-toolbar>
+    <ion-title>个人信息</ion-title>
+  </ion-toolbar>
+</ion-header>
+
+<ion-content>
+  <!-- 用户信息部分 -->
+  <ion-card>
+    <ion-card-content>
+      <ion-item lines="none">
+        <div class="touxiang">
+          <ion-avatar slot="start">
+            <img src="assets/touxiang.png">
+          </ion-avatar>
+        </div>
+        <ion-label>
+          <h2>用户名</h2>
+          <p>手机号</p>
+        </ion-label>
+      </ion-item>
+    </ion-card-content>
+  </ion-card>
+
+  <!-- 我的地址部分 -->
+  <!-- <ion-card>
+    <ion-card-header>
+      <ion-card-title>我的地址</ion-card-title>
+    </ion-card-header>
+    <ion-card-content>
+      <ion-list>
+        <ion-item>
+          <ion-label>地址1</ion-label>
+        </ion-item>
+        <ion-item>
+          <ion-label>地址2</ion-label>
+        </ion-item>
+      </ion-list>
+    </ion-card-content>
+  </ion-card> -->
+  <ion-card>
+    
+    <ion-card-content>
+      <ion-list lines="none">
+        <ion-item>
+          <ion-icon name="book-outline" slot="start"></ion-icon>
+          <ion-label>我的借阅</ion-label>
+          <ion-icon name="chevron-forward-outline" slot="end"></ion-icon>
+        </ion-item>
+        <ion-item>
+          <ion-icon name="chatbox-ellipses-outline" slot="start"></ion-icon>
+          <ion-label>我的请求</ion-label>
+          <ion-icon name="chevron-forward-outline" slot="end"></ion-icon>
+        </ion-item>
+        <ion-item>
+          <ion-icon name="list" slot="start"></ion-icon>
+          <ion-label>我的书单</ion-label>
+          <ion-icon name="chevron-forward-outline" slot="end"></ion-icon>
+        </ion-item>
+        <ion-item>
+          <ion-icon name="document-text-outline" slot="start"></ion-icon>
+          <ion-label>我的积分</ion-label>
+          <ion-icon name="chevron-forward-outline" slot="end"></ion-icon>
+        </ion-item>
+        <ion-item>
+          <ion-icon name="location-outline" slot="start"></ion-icon>
+          <ion-label>我的地址</ion-label>
+          <ion-icon name="chevron-forward-outline" slot="end"></ion-icon>
+        </ion-item>
+        <ion-item>
+          <ion-icon name="id-card-outline" slot="start"></ion-icon>
+          <ion-label>我的电子证</ion-label>
+          <ion-icon name="chevron-forward-outline" slot="end"></ion-icon>
+        </ion-item>
+        <ion-item>
+          <ion-icon name="thumbs-up-outline" slot="start"></ion-icon>
+          <ion-label>资源荐购</ion-label>
+          <ion-icon name="chevron-forward-outline" slot="end"></ion-icon>
+        </ion-item>
+        <ion-item>
+          <ion-icon name="add-outline" slot="start"></ion-icon>
+          <ion-label>资源捐赠</ion-label>
+          <ion-icon name="chevron-forward-outline" slot="end"></ion-icon>
+        </ion-item>
+      </ion-list>
+    </ion-card-content>
+  </ion-card>
+</ion-content>

+ 17 - 0
src/app/tab3/tab3.page.scss

@@ -0,0 +1,17 @@
+.touxiang {
+    display: flex;
+    justify-content: center;
+    align-items: center;
+    width: 100px;
+    height: 100px;
+  }
+  .touxiang img {
+    transform: scale(1.5);
+  }
+  ion-label h2, ion-label p {
+    margin-left: 30px;
+  }
+  ion-label h2 {
+    margin-bottom: 10px; 
+    font-size: 24px; 
+  }

+ 26 - 0
src/app/tab3/tab3.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 { Tab3Page } from './tab3.page';
+
+describe('Tab3Page', () => {
+  let component: Tab3Page;
+  let fixture: ComponentFixture<Tab3Page>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      declarations: [Tab3Page],
+      imports: [IonicModule.forRoot(), ExploreContainerComponentModule]
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(Tab3Page);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 12 - 0
src/app/tab3/tab3.page.ts

@@ -0,0 +1,12 @@
+import { Component } from '@angular/core';
+
+@Component({
+  selector: 'app-tab3',
+  templateUrl: 'tab3.page.html',
+  styleUrls: ['tab3.page.scss']
+})
+export class Tab3Page {
+
+  constructor() {}
+
+}

+ 39 - 0
src/app/tabs/tabs-routing.module.ts

@@ -0,0 +1,39 @@
+import { NgModule } from '@angular/core';
+import { RouterModule, Routes } from '@angular/router';
+import { TabsPage } from './tabs.page';
+
+const routes: Routes = [
+  {
+    path: 'tabs',
+    component: TabsPage,
+    children: [
+      {
+        path: 'tab1',
+        loadChildren: () => import('../tab1/tab1.module').then(m => m.Tab1PageModule)
+      },
+      {
+        path: 'tab2',
+        loadChildren: () => import('../tab2/tab2.module').then(m => m.Tab2PageModule)
+      },
+      {
+        path: 'tab3',
+        loadChildren: () => import('../tab3/tab3.module').then(m => m.Tab3PageModule)
+      },
+      {
+        path: '',
+        redirectTo: '/tabs/tab1',
+        pathMatch: 'full'
+      }
+    ]
+  },
+  {
+    path: '',
+    redirectTo: '/tabs/tab1',
+    pathMatch: 'full'
+  }
+];
+
+@NgModule({
+  imports: [RouterModule.forChild(routes)],
+})
+export class TabsPageRoutingModule {}

+ 19 - 0
src/app/tabs/tabs.module.ts

@@ -0,0 +1,19 @@
+import { IonicModule } from '@ionic/angular';
+import { NgModule } from '@angular/core';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+
+import { TabsPageRoutingModule } from './tabs-routing.module';
+
+import { TabsPage } from './tabs.page';
+
+@NgModule({
+  imports: [
+    IonicModule,
+    CommonModule,
+    FormsModule,
+    TabsPageRoutingModule
+  ],
+  declarations: [TabsPage]
+})
+export class TabsPageModule {}

+ 20 - 0
src/app/tabs/tabs.page.html

@@ -0,0 +1,20 @@
+<ion-tabs>
+
+  <ion-tab-bar slot="bottom">
+    <ion-tab-button tab="tab1" href="/tabs/tab1">
+      <ion-icon aria-hidden="true" name="triangle"></ion-icon>
+      <ion-label>消息</ion-label>
+    </ion-tab-button>
+
+    <ion-tab-button tab="tab2" href="/tabs/tab2">
+      <ion-icon aria-hidden="true" name="ellipse"></ion-icon>
+      <ion-label>首页</ion-label>
+    </ion-tab-button>
+
+    <ion-tab-button tab="tab3" href="/tabs/tab3">
+      <ion-icon aria-hidden="true" name="square"></ion-icon>
+      <ion-label>我的</ion-label>
+    </ion-tab-button>
+  </ion-tab-bar>
+
+</ion-tabs>

+ 1 - 0
src/app/tabs/tabs.page.scss

@@ -0,0 +1 @@
+

+ 26 - 0
src/app/tabs/tabs.page.spec.ts

@@ -0,0 +1,26 @@
+import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { TabsPage } from './tabs.page';
+
+describe('TabsPage', () => {
+  let component: TabsPage;
+  let fixture: ComponentFixture<TabsPage>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      declarations: [TabsPage],
+      schemas: [CUSTOM_ELEMENTS_SCHEMA],
+    }).compileComponents();
+  });
+
+  beforeEach(() => {
+    fixture = TestBed.createComponent(TabsPage);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 12 - 0
src/app/tabs/tabs.page.ts

@@ -0,0 +1,12 @@
+import { Component } from '@angular/core';
+
+@Component({
+  selector: 'app-tabs',
+  templateUrl: 'tabs.page.html',
+  styleUrls: ['tabs.page.scss']
+})
+export class TabsPage {
+
+  constructor() {}
+
+}

BIN
src/assets/icon/favicon.png


+ 1 - 0
src/assets/shapes.svg

@@ -0,0 +1 @@
+<svg width="350" height="140" xmlns="http://www.w3.org/2000/svg" style="background:#f6f7f9"><g fill="none" fill-rule="evenodd"><path fill="#F04141" style="mix-blend-mode:multiply" d="M61.905-34.23l96.194 54.51-66.982 54.512L22 34.887z"/><circle fill="#10DC60" style="mix-blend-mode:multiply" cx="155.5" cy="135.5" r="57.5"/><path fill="#3880FF" style="mix-blend-mode:multiply" d="M208.538 9.513l84.417 15.392L223.93 93.93z"/><path fill="#FFCE00" style="mix-blend-mode:multiply" d="M268.625 106.557l46.332-26.75 46.332 26.75v53.5l-46.332 26.75-46.332-26.75z"/><circle fill="#7044FF" style="mix-blend-mode:multiply" cx="299.5" cy="9.5" r="38.5"/><rect fill="#11D3EA" style="mix-blend-mode:multiply" transform="rotate(-60 148.47 37.886)" x="143.372" y="-7.056" width="10.196" height="89.884" rx="5.098"/><path d="M-25.389 74.253l84.86 8.107c5.498.525 9.53 5.407 9.004 10.905a10 10 0 0 1-.057.477l-12.36 85.671a10.002 10.002 0 0 1-11.634 8.42l-86.351-15.226c-5.44-.959-9.07-6.145-8.112-11.584l13.851-78.551a10 10 0 0 1 10.799-8.219z" fill="#7044FF" style="mix-blend-mode:multiply"/><circle fill="#0CD1E8" style="mix-blend-mode:multiply" cx="273.5" cy="106.5" r="20.5"/></g></svg>

BIN
src/assets/touxiang.png


BIN
src/assets/中国近代名家名作宝库.jpg


BIN
src/assets/在家过把“克隆”隐.jpg


BIN
src/assets/音乐会曲.jpg


+ 3 - 0
src/environments/environment.prod.ts

@@ -0,0 +1,3 @@
+export const environment = {
+  production: true
+};

+ 16 - 0
src/environments/environment.ts

@@ -0,0 +1,16 @@
+// This file can be replaced during build by using the `fileReplacements` array.
+// `ng build` replaces `environment.ts` with `environment.prod.ts`.
+// The list of file replacements can be found in `angular.json`.
+
+export const environment = {
+  production: false
+};
+
+/*
+ * For easier debugging in development mode, you can import the following file
+ * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`.
+ *
+ * This import should be commented out in production mode because it will have a negative impact
+ * on performance if an error is thrown.
+ */
+// import 'zone.js/plugins/zone-error';  // Included with Angular CLI.

+ 45 - 0
src/global.scss

@@ -0,0 +1,45 @@
+/*
+ * App Global CSS
+ * ----------------------------------------------------------------------------
+ * Put style rules here that you want to apply globally. These styles are for
+ * the entire app and not just one component. Additionally, this file can be
+ * used as an entry point to import other CSS/Sass files to be included in the
+ * output CSS.
+ * For more information on global stylesheets, visit the documentation:
+ * https://ionicframework.com/docs/layout/global-stylesheets
+ */
+
+/* Core CSS required for Ionic components to work properly */
+@import "@ionic/angular/css/core.css";
+
+/* Basic CSS for apps built with Ionic */
+@import "@ionic/angular/css/normalize.css";
+@import "@ionic/angular/css/structure.css";
+@import "@ionic/angular/css/typography.css";
+@import "@ionic/angular/css/display.css";
+
+/* Optional CSS utils that can be commented out */
+@import "@ionic/angular/css/padding.css";
+@import "@ionic/angular/css/float-elements.css";
+@import "@ionic/angular/css/text-alignment.css";
+@import "@ionic/angular/css/text-transformation.css";
+@import "@ionic/angular/css/flex-utils.css";
+
+/**
+ * Ionic Dark Mode
+ * -----------------------------------------------------
+ * For more info, please see:
+ * https://ionicframework.com/docs/theming/dark-mode
+ */
+
+/* @import "@ionic/angular/css/palettes/dark.always.css"; */
+/* @import "@ionic/angular/css/palettes/dark.class.css"; */
+@import "@ionic/angular/css/palettes/dark.system.css";
+.toast-center {
+    --background: rgba(184, 182, 182, 0.8);
+    --color: #fefefe;
+    text-align: center;
+  }
+  ion-back-button {
+    --color: gray; /* 设置颜色为灰色 */
+  }

+ 26 - 0
src/index.html

@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html lang="en">
+
+<head>
+  <meta charset="utf-8" />
+  <title>CampusBookConnect</title>
+
+  <base href="/" />
+
+  <meta name="color-scheme" content="light dark" />
+  <meta name="viewport" content="viewport-fit=cover, width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
+  <meta name="format-detection" content="telephone=no" />
+  <meta name="msapplication-tap-highlight" content="no" />
+
+  <link rel="icon" type="image/png" href="assets/icon/favicon.png" />
+
+  <!-- add to homescreen for ios -->
+  <meta name="apple-mobile-web-app-capable" content="yes" />
+  <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+</head>
+
+<body>
+  <app-root></app-root>
+</body>
+
+</html>

+ 6 - 0
src/main.ts

@@ -0,0 +1,6 @@
+import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
+
+import { AppModule } from './app/app.module';
+
+platformBrowserDynamic().bootstrapModule(AppModule)
+  .catch(err => console.log(err));

+ 55 - 0
src/polyfills.ts

@@ -0,0 +1,55 @@
+/**
+ * This file includes polyfills needed by Angular and is loaded before the app.
+ * You can add your own extra polyfills to this file.
+ *
+ * This file is divided into 2 sections:
+ *   1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
+ *   2. Application imports. Files imported after ZoneJS that should be loaded before your main
+ *      file.
+ *
+ * The current setup is for so-called "evergreen" browsers; the last versions of browsers that
+ * automatically update themselves. This includes recent versions of Safari, Chrome (including
+ * Opera), Edge on the desktop, and iOS and Chrome on mobile.
+ *
+ * Learn more in https://angular.io/guide/browser-support
+ */
+
+/***************************************************************************************************
+ * BROWSER POLYFILLS
+ */
+
+/**
+ * By default, zone.js will patch all possible macroTask and DomEvents
+ * user can disable parts of macroTask/DomEvents patch by setting following flags
+ * because those flags need to be set before `zone.js` being loaded, and webpack
+ * will put import in the top of bundle, so user need to create a separate file
+ * in this directory (for example: zone-flags.ts), and put the following flags
+ * into that file, and then add the following code before importing zone.js.
+ * import './zone-flags';
+ *
+ * The flags allowed in zone-flags.ts are listed here.
+ *
+ * The following flags will work for all browsers.
+ *
+ * (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
+ * (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
+ * (window as any).__zone_symbol__UNPATCHED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames
+ *
+ *  in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
+ *  with the following flag, it will bypass `zone.js` patch for IE/Edge
+ *
+ *  (window as any).__Zone_enable_cross_context_check = true;
+ *
+ */
+ 
+import './zone-flags';
+
+/***************************************************************************************************
+ * Zone JS is required by default for Angular itself.
+ */
+import 'zone.js';  // Included with Angular CLI.
+
+
+/***************************************************************************************************
+ * APPLICATION IMPORTS
+ */

+ 14 - 0
src/test.ts

@@ -0,0 +1,14 @@
+// This file is required by karma.conf.js and loads recursively all the .spec and framework files
+
+import 'zone.js/testing';
+import { getTestBed } from '@angular/core/testing';
+import {
+  BrowserDynamicTestingModule,
+  platformBrowserDynamicTesting
+} from '@angular/platform-browser-dynamic/testing';
+
+// First, initialize the Angular testing environment.
+getTestBed().initTestEnvironment(
+  BrowserDynamicTestingModule,
+  platformBrowserDynamicTesting(),
+);

+ 2 - 0
src/theme/variables.scss

@@ -0,0 +1,2 @@
+// For information on how to create your own theme, please see:
+// http://ionicframework.com/docs/theming/

+ 6 - 0
src/zone-flags.ts

@@ -0,0 +1,6 @@
+/**
+ * Prevents Angular change detection from
+ * running with certain Web Component callbacks
+ */
+// eslint-disable-next-line no-underscore-dangle
+(window as any).__Zone_disable_customElements = true;