|
@@ -1,14 +1,31 @@
|
|
|
import { Component } from '@angular/core';
|
|
import { Component } from '@angular/core';
|
|
|
-import { IonHeader, IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';
|
|
|
|
|
|
|
+import { IonHeader,IonToolbar, IonTitle, IonContent } from '@ionic/angular/standalone';
|
|
|
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
|
|
import { ExploreContainerComponent } from '../explore-container/explore-container.component';
|
|
|
|
|
+import { EditRatingStarComponent } from '../edit-rating-star/edit-rating-star.component';
|
|
|
|
|
+import { Router } from '@angular/router';
|
|
|
|
|
+import { IonButton} from '@ionic/angular/standalone';
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
|
|
|
@Component({
|
|
@Component({
|
|
|
selector: 'app-tab1',
|
|
selector: 'app-tab1',
|
|
|
templateUrl: 'tab1.page.html',
|
|
templateUrl: 'tab1.page.html',
|
|
|
styleUrls: ['tab1.page.scss'],
|
|
styleUrls: ['tab1.page.scss'],
|
|
|
standalone: true,
|
|
standalone: true,
|
|
|
- imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent],
|
|
|
|
|
|
|
+ imports: [IonToolbar, IonTitle, IonContent, ExploreContainerComponent,EditRatingStarComponent,IonHeader,IonButton],
|
|
|
})
|
|
})
|
|
|
export class Tab1Page {
|
|
export class Tab1Page {
|
|
|
- constructor() {}
|
|
|
|
|
|
|
+ //星星打分
|
|
|
|
|
+ currentScore: number = 0; // 初始分值
|
|
|
|
|
+
|
|
|
|
|
+ constructor(private router: Router){}
|
|
|
|
|
+ goTestPage(){
|
|
|
|
|
+ this.router.navigate(['/tabs/test'])
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ handleScoreChange(newScore: number) {
|
|
|
|
|
+ this.currentScore = newScore;
|
|
|
|
|
+ console.log('新分值:', newScore); // 处理分值变化
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|