| 
					
				 | 
			
			
				@@ -1,9 +1,10 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { Component, OnInit,NgModule } from '@angular/core'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { Component, OnInit } from '@angular/core'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import { Router } from '@angular/router'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList,  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  IonListHeader,IonCardHeader,IonCardTitle,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption } from '@ionic/angular/standalone'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import { IonHeader,IonButton, IonList, IonListHeader, IonItem,IonContent, IonIcon, IonLabel, IonCardHeader,IonCardContent, IonTitle,IonCard, IonToolbar,IonInput,IonSearchbar, IonSegment, IonSegmentButton, IonSelect, IonSelectOption } from '@ionic/angular/standalone'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   import { CommonModule } from '@angular/common'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  import { FormsModule } from '@angular/forms'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import { FormsModule } from '@angular/forms'; // 导入 FormsModule 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  import { HttpClient } from '@angular/common/http'; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 @Component({ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   selector: 'app-page-publishsurvey', 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -11,12 +12,11 @@ import { IonHeader,IonButton, IonContent, IonIcon, IonItem, IonLabel, IonList, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   styleUrls: ['./page-publishsurvey.component.scss'], 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   standalone: true, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   imports: [ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     IonHeader,IonToolbar,IonTitle,IonContent,IonSegment,IonSegmentButton,IonSelect,IonSelectOption, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    IonList,IonListHeader,IonItem,IonCardTitle, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    FormsModule,IonList, IonListHeader, IonItem, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     IonLabel,IonIcon,IonButton,IonCardContent, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     IonInput,IonSearchbar,IonCard,IonCardHeader, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    CommonModule,FormsModule 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    CommonModule, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   ] 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 }) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -39,6 +39,21 @@ export class PagePublishsurveyComponent  implements OnInit { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     console.log(`链接: ${this.surveyLink}`); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     console.log(`面向对象: ${this.targetAudience}`); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 这里可以添加逻辑将问卷发布到后端或其他处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    const surveyData = { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      title: this.surveyTitle, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      link: this.surveyLink, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      audience: this.targetAudience, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    this.http.post('http://127.0.0.1:4040/', surveyData).subscribe( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      response => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.log('问卷已成功发布:', response); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+         
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      }, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      error => { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.error('发布问卷时出错:', error); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+      } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   publishSocietySurvey() { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -48,9 +63,9 @@ export class PagePublishsurveyComponent  implements OnInit { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     // 这里可以添加逻辑将问卷发布到后端或其他处理 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-  constructor(private router: Router) { } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+  constructor(private router: Router,private http: HttpClient) { } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				   goTab1(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    this.router.navigate(['tabs/tab1']); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    this.router.navigate(['tabs/page-psysurvey']); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 |