Bladeren bron

页面优化

Breeze 4 maanden geleden
bovenliggende
commit
afeb2f3ff2
3 gewijzigde bestanden met toevoegingen van 2 en 50 verwijderingen
  1. 1 39
      src/app/tab2/smovies/smovies.page.html
  2. 0 10
      src/app/tab2/smovies/smovies.page.ts
  3. 1 1
      src/environments/environment.ts

+ 1 - 39
src/app/tab2/smovies/smovies.page.html

@@ -13,25 +13,8 @@
     </ion-buttons>
   </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-content>
-  <ion-card>
-    <ion-card-content>
-      <ion-row>
-        <ion-col size="3" (click)="fetchMovies()">全部</ion-col>
-        <ion-col size="3" (click)="filterByCategory($event, '电影')">电影</ion-col>
-        <ion-col size="3" (click)="filterByCategory($event, '电视')">电视</ion-col>
-      </ion-row>
-    </ion-card-content>
-  </ion-card>
-
   <ion-card>
     <ion-card-content>
       <ion-row>
@@ -49,14 +32,10 @@
         <ion-col size="3" (click)="filterByCategory($event, '中国')">中国</ion-col>
         <ion-col size="3" (click)="filterByCategory($event, '俄罗斯')">俄罗斯</ion-col>
         <ion-col size="3" (click)="filterByCategory($event, '美国')">美国</ion-col>
-      </ion-row>
-      <ion-row>
         <ion-col size="3" (click)="filterByCategory($event, '巴西')">巴西</ion-col>
         <ion-col size="3" (click)="filterByCategory($event, '英国')">英国</ion-col>
         <ion-col size="3" (click)="filterByCategory($event, '法国')">法国</ion-col>
         <ion-col size="3" (click)="filterByCategory($event, '日本')">日本</ion-col>
-      </ion-row>
-      <ion-row>
         <ion-col size="3" (click)="filterByCategory($event, '西班牙')">西班牙</ion-col>
         <ion-col size="3" (click)="filterByCategory($event, '韩国')">韩国</ion-col>
       </ion-row>
@@ -70,31 +49,16 @@
         <ion-col size="3" (click)="filterByCategory($event, '爱情')">爱情</ion-col>
         <ion-col size="3" (click)="filterByCategory($event, '喜剧')">喜剧</ion-col>
         <ion-col size="3" (click)="filterByCategory($event, '科幻')">科幻</ion-col>
-      </ion-row>
-      <ion-row>
         <ion-col size="3" (click)="filterByCategory($event, '动作')">动作</ion-col>
         <ion-col size="3" (click)="filterByCategory($event, '悬疑')">悬疑</ion-col>
         <ion-col size="3" (click)="filterByCategory($event, '犯罪')">犯罪</ion-col>
         <ion-col size="3" (click)="filterByCategory($event, '青春')">青春</ion-col>
-      </ion-row>
-      <ion-row>
         <ion-col size="3" (click)="filterByCategory($event, '惊悚')">惊悚</ion-col>
         <ion-col size="3" (click)="filterByCategory($event, '文艺')">文艺</ion-col>
       </ion-row>
     </ion-card-content>
   </ion-card>
 
-
-
-
-  <ion-content>
-    <!-- <ion-searchbar [(ngModel)]="searchQuery" (ionInput)="fetchPets()"></ion-searchbar>
-    <ion-segment [(ngModel)]="selectedType" (ionChange)="fetchPets()"> -->
-      <!-- <ion-segment-button *ngFor="let type of petTypes" [value]="type">
-        {{ type }}
-      </ion-segment-button> -->
-    <!-- </ion-segment> -->
-    <!-- <ion-button (click)="toggleSort()">Sort by Price</ion-button> -->
     <ion-list>
       <ion-card *ngFor="let movie of filteredMovies">
         <ion-card-header>
@@ -108,9 +72,7 @@
           <p>介绍:{{ movie.get('introduction') }}</p>
           <p>评分:{{ movie.get('rating') }}</p>
         </ion-card-content>
-        <!-- <ion-button fill="clear" routerLink="/study/pet/{{pet.id}}">详情</ion-button> -->
-        <!-- <ion-button *ngIf="pet?.get('user')?.id == user?.id" fill="clear" routerLink="/study/pet/edit/{{pet.id}}">编辑</ion-button> -->
+       
       </ion-card>
     </ion-list>
-  </ion-content>
 </ion-content>

+ 0 - 10
src/app/tab2/smovies/smovies.page.ts

@@ -69,23 +69,13 @@ export class SMoviesPage implements OnInit {
   filteredMovies: any[] = [];
   allMovies: any[] = [];
   searchQuery: string = '';
-  selectedType: string = '';
   
   async fetchMovies() {
-
     const YJMovies = Parse.Object.extend('YJMovies');
     const query = new Parse.Query(YJMovies);
     this.allMovies = await query.find();
     this.filteredMovies = this.allMovies;
     this.filteredMovies = await this.parseService.queryMovies();
   }
-
-  // filterByCategory(event: any, category: string) {
-  //   if (category === '') {
-  //     this.filteredMovies = this.allMovies;
-  //   } else {
-  //     this.filteredMovies = this.allMovies.filter(movie => movie.get('type') === category);
-  //   }
-  // }
   
 }

+ 1 - 1
src/environments/environment.ts

@@ -9,7 +9,7 @@
 export const environment = {
   production: false,
   parseAppId: 'dev',
-  parseServerUrl: 'http://127.0.0.1:4040/apps/Web3De/browser/YJMovies'
+  parseServerUrl: 'http://web2023.fmode.cn:9999/parse'
  };
 
 /*