Browse Source

fit:thanks cloud

0225304 3 days ago
parent
commit
4cb2a85656

+ 0 - 9
myapp/src/app/modals/diary.modal.ts

@@ -1,9 +0,0 @@
-export interface Diary {
-  id: number;
-  date: string;
-  weekday: string;
-  time: string;
-  content: string;
-  weather?: string;
-  mood?: string;
-}

+ 104 - 104
myapp/src/app/services/diary.service.ts

@@ -1,47 +1,106 @@
-import { Injectable } from '@angular/core';
-import { Diary } from '../modals/diary.modal';
-import { AlertController } from '@ionic/angular'; // 添加这行
+// import { Injectable } from '@angular/core';
+// import { Diary } from '../modals/diary.modal';
+// import { AlertController } from '@ionic/angular'; // 添加这行
 
-@Injectable({
-  providedIn: 'root'
-})
-export class DiaryService {
-  private storageKey = 'diaries';
-    modalCtrl: any;
+// @Injectable({
+//   providedIn: 'root'
+// })
+// export class DiaryService {
+//   private storageKey = 'diaries';
+//     modalCtrl: any;
   
-    //alertCtrl: any;
-    //storage: any;
+//     //alertCtrl: any;
+//     //storage: any;
 
-  constructor(private alertCtrl: AlertController) {}
+//   constructor(private alertCtrl: AlertController) {}
 
-  async getDiaries(): Promise<Diary[]> {
-    const data = localStorage.getItem(this.storageKey);
-    return data ? JSON.parse(data) : [];
-  }
-
-  async addDiary(diary: Diary): Promise<void> {
-    const diaries = await this.getDiaries();
-    diaries.push(diary);
-    localStorage.setItem(this.storageKey, JSON.stringify(diaries));
-  }
+//   async getDiaries(): Promise<Diary[]> {
+//     const data = localStorage.getItem(this.storageKey);
+//     return data ? JSON.parse(data) : [];
+//   }
 
-  async updateDiary(updatedDiary: Diary): Promise<void> {
-    const diaries = await this.getDiaries();
-    const index = diaries.findIndex(d => d.id === updatedDiary.id);
-    if (index !== -1) {
-      diaries[index] = updatedDiary;
-      localStorage.setItem(this.storageKey, JSON.stringify(diaries));
-    }
-  }
+//   async addDiary(diary: Diary): Promise<void> {
+//     const diaries = await this.getDiaries();
+//     diaries.push(diary);
+//     localStorage.setItem(this.storageKey, JSON.stringify(diaries));
+//   }
 
-//   async deleteDiary(id: number): Promise<void> {
+//   async updateDiary(updatedDiary: Diary): Promise<void> {
 //     const diaries = await this.getDiaries();
-//     const updatedDiaries = diaries.filter(d => d.id !== id);
-//     //await this.storage.set('diaries', updatedDiaries);
-//     localStorage.setItem(this.storageKey, JSON.stringify(updatedDiaries));
+//     const index = diaries.findIndex(d => d.id === updatedDiary.id);
+//     if (index !== -1) {
+//       diaries[index] = updatedDiary;
+//       localStorage.setItem(this.storageKey, JSON.stringify(diaries));
+//     }
 //   }
 
-//   async deleteDiary(id: number): Promise<boolean> {
+// //   async deleteDiary(id: number): Promise<void> {
+// //     const diaries = await this.getDiaries();
+// //     const updatedDiaries = diaries.filter(d => d.id !== id);
+// //     //await this.storage.set('diaries', updatedDiaries);
+// //     localStorage.setItem(this.storageKey, JSON.stringify(updatedDiaries));
+// //   }
+
+// //   async deleteDiary(id: number): Promise<boolean> {
+// //     return new Promise<boolean>(async (resolve) => {
+// //       const alert = await this.alertCtrl.create({
+// //         header: '确认删除',
+// //         message: '确定要删除这篇日记吗?',
+// //         buttons: [
+// //           {
+// //             text: '取消',
+// //             role: 'cancel',
+// //             handler: () => resolve(false)
+// //           },
+// //           {
+// //             text: '删除',
+// //             handler: async () => {
+// //               const diaries = await this.getDiaries();
+// //               const updatedDiaries = diaries.filter(d => d.id !== id);
+// //               localStorage.setItem(this.storageKey, JSON.stringify(updatedDiaries));
+// //               resolve(true);
+// //             }
+// //           }
+// //         ]
+// //       });
+      
+// //       await alert.present();
+// //     });
+// //   }
+
+// //   async deleteDiary(id: number): Promise<boolean> {
+// //   const alert = await this.alertCtrl.create({
+// //     header: '确认删除',
+// //     message: '确定要删除这篇日记吗?',
+// //     buttons: [
+// //       {
+// //         text: '取消',
+// //         role: 'cancel',
+// //         handler: () => {
+// //           return false;
+// //         }
+// //       },
+// //       {
+// //         text: '删除',
+// //         handler: () => {
+// //           this.confirmDelete(id);
+// //           return true;
+// //         }
+// //       }
+// //     ]
+// //   });
+  
+// //   await alert.present();
+// //   return true;
+// // }
+
+// // private async confirmDelete(id: number) {
+// //   const diaries = await this.getDiaries();
+// //   const updatedDiaries = diaries.filter(d => d.id !== id);
+// //   localStorage.setItem(this.storageKey, JSON.stringify(updatedDiaries));
+// // }
+
+// async deleteDiary(id: number): Promise<boolean> {
 //     return new Promise<boolean>(async (resolve) => {
 //       const alert = await this.alertCtrl.create({
 //         header: '确认删除',
@@ -59,6 +118,8 @@ export class DiaryService {
 //               const updatedDiaries = diaries.filter(d => d.id !== id);
 //               localStorage.setItem(this.storageKey, JSON.stringify(updatedDiaries));
 //               resolve(true);
+//               // 关闭当前页面并返回tab1
+//             //this.modalCtrl.dismiss({ deleted: true });
 //             }
 //           }
 //         ]
@@ -67,72 +128,11 @@ export class DiaryService {
 //       await alert.present();
 //     });
 //   }
-
-//   async deleteDiary(id: number): Promise<boolean> {
-//   const alert = await this.alertCtrl.create({
-//     header: '确认删除',
-//     message: '确定要删除这篇日记吗?',
-//     buttons: [
-//       {
-//         text: '取消',
-//         role: 'cancel',
-//         handler: () => {
-//           return false;
-//         }
-//       },
-//       {
-//         text: '删除',
-//         handler: () => {
-//           this.confirmDelete(id);
-//           return true;
-//         }
-//       }
-//     ]
-//   });
-  
-//   await alert.present();
-//   return true;
-// }
-
-// private async confirmDelete(id: number) {
-//   const diaries = await this.getDiaries();
-//   const updatedDiaries = diaries.filter(d => d.id !== id);
-//   localStorage.setItem(this.storageKey, JSON.stringify(updatedDiaries));
-// }
-
-async deleteDiary(id: number): Promise<boolean> {
-    return new Promise<boolean>(async (resolve) => {
-      const alert = await this.alertCtrl.create({
-        header: '确认删除',
-        message: '确定要删除这篇日记吗?',
-        buttons: [
-          {
-            text: '取消',
-            role: 'cancel',
-            handler: () => resolve(false)
-          },
-          {
-            text: '删除',
-            handler: async () => {
-              const diaries = await this.getDiaries();
-              const updatedDiaries = diaries.filter(d => d.id !== id);
-              localStorage.setItem(this.storageKey, JSON.stringify(updatedDiaries));
-              resolve(true);
-              // 关闭当前页面并返回tab1
-            //this.modalCtrl.dismiss({ deleted: true });
-            }
-          }
-        ]
-      });
-      
-      await alert.present();
-    });
-  }
-//    async onDelete(id: number) {
-//     const success = await this.diaryService.deleteDiary(id);
-//     if (success) {
-//       // 刷新列表
-//       this.loadDiaries();
-//     }
-//  }
-}
+// //    async onDelete(id: number) {
+// //     const success = await this.diaryService.deleteDiary(id);
+// //     if (success) {
+// //       // 刷新列表
+// //       this.loadDiaries();
+// //     }
+// //  }
+// }

+ 15 - 0
myapp/src/app/services/event.service.ts

@@ -0,0 +1,15 @@
+import { Injectable } from '@angular/core';
+import { Subject } from 'rxjs';
+
+@Injectable({
+  providedIn: 'root'
+})
+export class EventService {
+  private diaryDeletedSource = new Subject<void>();
+  
+  diaryDeleted$ = this.diaryDeletedSource.asObservable();
+
+  emitDiaryDeleted() {
+    this.diaryDeletedSource.next();
+  }
+}

+ 0 - 53
myapp/src/app/tab1/edit/edit.page.html

@@ -1,56 +1,3 @@
-<!-- <ion-header [translucent]="true">
-  <ion-toolbar>
-    <ion-buttons slot="start">
-      <ion-button (click)="cancel()">取消</ion-button>
-    </ion-buttons>
-    <ion-title>{{mode === 'edit' ? '编辑日记' : '新建日记'}}</ion-title>
-    <ion-buttons slot="end">
-      <ion-button (click)="save()" [strong]="true">保存</ion-button>
-    </ion-buttons>
-  </ion-toolbar>
-</ion-header>
-
-<ion-content [fullscreen]="true">
-  <div class="edit-container">
-    <div class="info-row">
-      <div class="date-info">
-        <div class="date">{{diary.date}}</div>
-        <div class="weekday">{{diary.weekday}}</div>
-        <div class="time">{{diary.time}}</div>
-      </div>
-      
-      <div class="selectors">
-        <ion-item>
-          <ion-select label="天气" [(ngModel)]="diary.weather" interface="action-sheet">
-            <ion-select-option value="晴">晴</ion-select-option>
-            <ion-select-option value="多云">多云</ion-select-option>
-            <ion-select-option value="阴">阴</ion-select-option>
-            <ion-select-option value="雨">雨</ion-select-option>
-            <ion-select-option value="雪">雪</ion-select-option>
-          </ion-select>
-        </ion-item>
-        
-        <ion-item>
-          <ion-select label="心情" [(ngModel)]="diary.mood" interface="action-sheet">
-            <ion-select-option value="😊">😊 开心</ion-select-option>
-            <ion-select-option value="😢">😢 难过</ion-select-option>
-            <ion-select-option value="😠">😠 生气</ion-select-option>
-            <ion-select-option value="😌">😌 平静</ion-select-option>
-            <ion-select-option value="🤔">🤔 思考</ion-select-option>
-          </ion-select>
-        </ion-item>
-      </div>
-    </div>
-    
-    <ion-textarea
-      [(ngModel)]="diary.content"
-      placeholder="写下你的日记..."
-      autoGrow="true"
-      class="diary-content"
-    ></ion-textarea>
-  </div>
-</ion-content> -->
-
 <ion-header>
   <ion-toolbar>
     <ion-buttons slot="start">

+ 6 - 87
myapp/src/app/tab1/tab1.page.ts

@@ -1,13 +1,8 @@
 import { Component, OnInit } from '@angular/core';
 import { NavController } from '@ionic/angular';
-import { AuthService } from '../services/auth.service';
-import { Router } from '@angular/router';
 import { ModalController } from '@ionic/angular';
-import { EditPage } from './edit/edit.page';
-import { DiaryService } from '../services/diary.service';
-import { Diary } from '../modals/diary.modal';
-import { TestMessagePage } from './test-message/test-message.page';
-
+import { EditPage } from './edit/edit.page'; 
+import { IonRouterOutlet } from '@ionic/angular';
 import { CloudObject, CloudQuery } from 'src/lib/ncloud';
 @Component({
   selector: 'app-tab1',
@@ -23,9 +18,8 @@ export class Tab1Page implements OnInit{
 
   constructor(
     private modalCtrl: ModalController,
-    //private diaryService: DiaryService,
+    private routerOutlet: IonRouterOutlet,
     private navCtrl: NavController,
-    //private router: Router
   ) {
     this.loadDiaries();
   }
@@ -39,6 +33,8 @@ export class Tab1Page implements OnInit{
 
   ngOnInit() {
     this.diaryList=[];
+
+    
   }
 
    async importDiary(){
@@ -166,82 +162,5 @@ export class Tab1Page implements OnInit{
     this.navCtrl.navigateForward(['tabs', 'tab1', 'message'], {
     queryParams: { Did: diary.get('Did') }
   });
-  }
-
-  
-
-  //   messageList:any[]=[
-  // {
-  //   "id": 1,
-  //   "date": "15",
-  //   "weekday": "周三",
-  //   "time": "14:30",
-  //   "content": "今天阳光明媚,去公园散步时看到樱花开了。粉色的花瓣随风飘落,美得像一幅画。坐在长椅上读了一会儿书,感觉心情特别平静。",
-  //   "weather": "晴",
-  //   "mood": "😊"
-  // },
-  // {
-  //   "id": 2,
-  //   "date": "14",
-  //   "weekday": "周二",
-  //   "time": "21:15",
-  //   "content": "项目终于告一段落,加班到很晚但很有成就感。回家的路上买了杯热奶茶犒劳自己,发现常去的那家奶茶店换了新包装,杯子上画着可爱的小兔子。",
-  //   "weather": "多云",
-  //   "mood": "😌"
-  // },
-  // {
-  //   "id": 3,
-  //   "date": "12",
-  //   "weekday": "周日",
-  //   "time": "09:45",
-  //   "content": "周末尝试做了新的菜谱 - 番茄牛腩。虽然炖的时间比预期长,但结果非常美味!下午窝在沙发上看了一部老电影,窗外下着小雨,这种慵懒的周末真是太棒了。",
-  //   "weather": "小雨",
-  //   "mood": "🥰"
-  // },
-  // {
-  //   "id": 4,
-  //   "date": "18",
-  //   "weekday": "周五",
-  //   "time": "18:20",
-  //   "content": "参加了公司的团队建设活动,第一次体验了攀岩项目。虽然爬到一半有些害怕,但在同事的鼓励下成功登顶,突破自我的感觉真好!",
-  //   "weather": "阴",
-  //   "mood": "😄"
-  // },
-  // {
-  //   "id": 5,
-  //   "date": "20",
-  //   "weekday": "周六",
-  //   "time": "15:10",
-  //   "content": "和朋友去了新开的猫咖,有十几只不同品种的猫咪。最喜欢那只胖乎乎的橘猫,它居然在我腿上睡了一下午,治愈了连日的疲惫。",
-  //   "weather": "晴",
-  //   "mood": "😺"
-  // },
-  // {
-  //   "id": 6,
-  //   "date": "22",
-  //   "weekday": "周一",
-  //   "time": "08:05",
-  //   "content": "早起晨跑时发现小区里的桂花开了,空气里都是甜甜的香气。顺手拍了张晨光中的花枝,设为手机壁纸后整天都有好心情。",
-  //   "weather": "雾",
-  //   "mood": "🌼"
-  // },
-  // {
-  //   "id": 7,
-  //   "date": "25",
-  //   "weekday": "周四",
-  //   "time": "19:40",
-  //   "content": "下班路上遇到卖糖炒栗子的小摊,热乎乎的栗子捧在手里,边走边吃仿佛回到学生时代。突然想念大学的林荫道和图书馆了。",
-  //   "weather": "微风",
-  //   "mood": "🍂"
-  // },
-  // {
-  //   "id": 8,
-  //   "date": "28",
-  //   "weekday": "周日",
-  //   "time": "22:30",
-  //   "content": "整理旧物时发现了高中时期的同学录,翻看那些青涩的留言和夸张的贴纸,忍不住笑出声。那些以为忘记的回忆突然都鲜活起来。",
-  //   "weather": "晴",
-  //   "mood": "📖"
-  // }
-  // ]; 
+  } 
 }

+ 4 - 7
myapp/src/app/tab1/test-message/test-message.page.ts

@@ -16,8 +16,7 @@ export class TestMessagePage implements OnInit {
   diaryId: string = '';
 
   constructor(
-    private route: ActivatedRoute,
-    private router: Router,
+    private route: ActivatedRoute, 
     private navCtrl: NavController,
     private modalCtrl: ModalController
   ) {}
@@ -62,10 +61,6 @@ export class TestMessagePage implements OnInit {
     
     const modal = await this.modalCtrl.create({
       component: EditPage,
-      // componentProps: {
-      //   diary: this.diary.toJSON(),
-      //   editMode: true
-      // }
       componentProps: {
         diary: diaryData,
         editMode: true
@@ -93,7 +88,9 @@ export class TestMessagePage implements OnInit {
       if (objectToDelete) {
         // 假设 CloudObject 有 destroy 方法而不是 delete
         await objectToDelete.destroy(); // 或者使用其他删除方法如 remove()
-        this.navCtrl.navigateBack('/tabs/tab1');
+        this.navCtrl.navigateBack('/tabs/tab1', {
+          //state: { refreshDiaries: true }
+      });
       }
     } catch (error) {
       console.error('删除日记失败:', error);

+ 30 - 65
myapp/src/app/tab2/tab2.page.html

@@ -2,11 +2,16 @@
   
   <!-- 顶部搜索栏 -->
     <div class="header">
-        <i class="envelope-icon ion-ios-mail"></i>
-        <div class="search-bar">
+         <!-- <i class="envelope-icon ion-ios-mail"></i> -->
+         <ion-item class="search-bar">
+            <ion-icon name="search-outline"></ion-icon>
+            <ion-input class="Input with placeholder" placeholder="负面情绪禁止过夜——现在立刻销毁"></ion-input>
+        </ion-item>
+        
+        <!-- <div class="search-bar">
             <i class="search-icon ion-ios-search"></i>
             <div class="search-placeholder">负面情绪禁止过夜——现在立刻销毁</div>
-        </div>
+        </div> -->
     </div>
 
 </ion-header>
@@ -37,7 +42,8 @@
                     <div class="user-avatar">A</div>
                     <div class="user-name">情绪管理师</div>
                 </div>
-                <i class="more-icon ion-ios-more"></i>
+                <ion-icon name="ellipsis-horizontal" class="more-icon"></ion-icon>
+                <!-- <i class="more-icon ion-ios-more"></i> -->
             </div>
             <div class="diary-content">
                 今天学会了用正念冥想缓解焦虑,分享给大家:找一个安静的地方,专注于呼吸,感受空气进入和离开身体的感觉...
@@ -47,16 +53,16 @@
             </div>
             <div class="action-bar">
                 <div class="action-item">
-                    <i class="action-icon ion-ios-heart"></i>
-                    <span>256</span>
+                    <ion-icon name="heart" class="action-icon heart-icon"></ion-icon>
+                    <span class="action-count">256</span>
                 </div>
                 <div class="action-item">
-                    <i class="action-icon ion-ios-chatbubbles"></i>
-                    <span>43</span>
+                    <ion-icon name="chatbubble-ellipses" class="action-icon"></ion-icon>
+                    <span class="action-count">43</span>
                 </div>
                 <div class="action-item">
-                    <i class="action-icon ion-ios-share-alt"></i>
-                    <span>分享</span>
+                    <ion-icon name="share-social" class="action-icon"></ion-icon>
+                    <span class="action-text">5</span>
                 </div>
             </div>
         </div>
@@ -68,23 +74,23 @@
                     <div class="user-avatar">B</div>
                     <div class="user-name">阳光小筑</div>
                 </div>
-                <i class="more-icon ion-ios-more"></i>
+                <ion-icon name="ellipsis-horizontal" class="more-icon"></ion-icon>
             </div>
             <div class="diary-content">
                 记录三件今天感恩的事:1. 早晨听到鸟叫声 2. 同事分享了好吃的饼干 3. 下班路上看到了美丽的晚霞
             </div>
             <div class="action-bar">
                 <div class="action-item">
-                    <i class="action-icon ion-ios-heart"></i>
-                    <span>189</span>
+                    <ion-icon name="heart" class="action-icon heart-icon"></ion-icon>
+                    <span class="action-count">189</span>
                 </div>
                 <div class="action-item">
-                    <i class="action-icon ion-ios-chatbubbles"></i>
-                    <span>32</span>
+                    <ion-icon name="chatbubble-ellipses" class="action-icon"></ion-icon>
+                    <span class="action-count">32</span>
                 </div>
                 <div class="action-item">
-                    <i class="action-icon ion-ios-share-alt"></i>
-                    <span>分享</span>
+                    <ion-icon name="share-social" class="action-icon"></ion-icon>
+                    <span class="action-text">3</span>
                 </div>
             </div>
         </div>
@@ -96,7 +102,7 @@
                     <div class="user-avatar">C</div>
                     <div class="user-name">树洞倾听者</div>
                 </div>
-                <i class="more-icon ion-ios-more"></i>
+                <ion-icon name="ellipsis-horizontal" class="more-icon"></ion-icon>
             </div>
             <div class="diary-content">
                 今天在公园长椅上发现了一个漂流瓶,里面写着"希望找到能懂我的人"。如果你看到这条消息,请记住世界上总有人愿意倾听你的故事。
@@ -106,60 +112,19 @@
             </div>
             <div class="action-bar">
                 <div class="action-item">
-                    <i class="action-icon ion-ios-heart"></i>
-                    <span>312</span>
+                    <ion-icon name="heart" class="action-icon heart-icon"></ion-icon>
+                    <span class="action-count">312</span>
                 </div>
                 <div class="action-item">
-                    <i class="action-icon ion-ios-chatbubbles"></i>
-                    <span>76</span>
+                    <ion-icon name="chatbubble-ellipses" class="action-icon"></ion-icon>
+                    <span class="action-count">76</span>
                 </div>
                 <div class="action-item">
-                    <i class="action-icon ion-ios-share-alt"></i>
-                    <span>分享</span>
+                    <ion-icon name="share-social" class="action-icon"></ion-icon>
+                    <span class="action-text">2</span>
                 </div>
             </div>
         </div>
     </div>
 
-    <script>
-        // 标签切换功能
-        const tabItems = document.querySelectorAll('.tab-item');
-        tabItems.forEach(item => {
-            item.addEventListener('click', function() {
-                tabItems.forEach(tab => tab.classList.remove('active'));
-                this.classList.add('active');
-            });
-        });
-        
-        // 点赞功能
-        const likeButtons = document.querySelectorAll('.ion-ios-heart');
-        likeButtons.forEach(button => {
-            button.addEventListener('click', function(e) {
-                e.stopPropagation();
-                const countElement = this.nextElementSibling;
-                let count = parseInt(countElement.textContent);
-                
-                if(this.classList.contains('liked')) {
-                    this.classList.remove('liked');
-                    count--;
-                    this.style.color = '#a69b8f';
-                } else {
-                    this.classList.add('liked');
-                    count++;
-                    this.style.color = '#d89ba3';
-                }
-                
-                countElement.textContent = count;
-            });
-        });
-        
-        // 动态卡片点击效果
-        const diaryItems = document.querySelectorAll('.diary-item');
-        diaryItems.forEach(item => {
-            item.addEventListener('click', function() {
-                console.log('查看动态详情');
-            });
-        });
-    </script>
-
 </ion-content>

+ 2 - 1
myapp/src/app/tab2/tab2.page.scss

@@ -40,9 +40,10 @@ body {
     color: #b38a58;
 }
 
-.search-icon {
+.search-outline {
     font-size: 1rem;
     margin-right: 8px;
+    //color:black;
 }
 
 .search-placeholder {

+ 11 - 10
myapp/src/app/tab2/thanks-cloud/thanks-cloud.page.ts

@@ -28,11 +28,12 @@ export class ThanksCloudPage implements OnInit {
 
   ngOnInit() {
     this.loadThanksType()
+    this.thanksList=[];
   }
   async importThanks(){
     const thanksDataset = [
     {
-        id: 1,
+        Tid: 1,
         date: 17,
         weekday: "周五",
         time: "07:15",
@@ -46,7 +47,7 @@ export class ThanksCloudPage implements OnInit {
         emotionalJournal: "安静→温暖→感恩的情绪流动"
     },
     {​
-        id: 2,
+        Tid: 2,
         date: 18,
         weekday: "周六",
         time: "14:30",
@@ -60,7 +61,7 @@ export class ThanksCloudPage implements OnInit {
         emotionalJournal: "平淡→惊喜→满足的情绪转变"
     }​,
     {​
-        id: 3,
+        Tid: 3,
         date: 19,
         weekday: "周日",
         time: "19:45",
@@ -74,7 +75,7 @@ export class ThanksCloudPage implements OnInit {
         emotionalJournal: "疲惫→舒缓→放松的情绪过渡"
     }​,
     {​
-        id: 4,
+        Tid: 4,
         date: 20,
         weekday: "周一",
         time: "12:10",
@@ -88,7 +89,7 @@ export class ThanksCloudPage implements OnInit {
         emotionalJournal: "平淡→欢乐→温暖的情绪变化"
     }​,
     {​
-        id: 5,
+        Tid: 5,
         date: 21,
         weekday: "周二",
         time: "21:30",
@@ -102,7 +103,7 @@ export class ThanksCloudPage implements OnInit {
         emotionalJournal: "焦虑→惊喜→温暖的情绪起伏"
     }​,
     {​
-        id: 6,
+        Tid: 6,
         date: 22,
         weekday: "周三",
         time: "08:20",
@@ -114,16 +115,16 @@ export class ThanksCloudPage implements OnInit {
         actionStep: "每天记录一个自然观察小发现",
         emotionalImpact: "愉悦感 + 2 | 对生活的热爱 + 2",
         emotionalJournal: "平常→惊喜→热爱的情绪流动"
-    }
+    }
     ];
     const ThanksType=new CloudObject("ThanksType");
-    const query=new CloudQuery("Thankstype");
+    const query=new CloudQuery("ThanksType");
 
     for(const thanks of thanksDataset){
       try{
-        const query=new CloudQuery("Thankstype");
+        const query=new CloudQuery("ThanksType");
         //检查是否已存在相同内容
-        query.equalTo("content",thanks.content);
+        query.equalTo("Tid",thanks.Tid);
         const existing=await query.first();
 
         if(existing){

+ 2 - 2
myapp/src/app/tab4/tab4.page.html

@@ -12,11 +12,11 @@
     <!-- 顶部信息栏 -->
     <div class="profile-header">
         <div class="user-info">
-            <div (click)="goLogin('登录')">
+            <div>
                 <div class="user-name">匿名兔ffe</div>
                 <div class="user-id">UID:a15143bcf10c4d...</div>
             </div>
-            <button class="copy-btn">复制</button>
+            <button (click)="goLogin('登录')" class="copy-btn">登录</button>
         </div>
         
         <div class="stats-container">