Prechádzať zdrojové kódy

fix: tab 1 and tab 2

yuebuzu-creater 4 mesiacov pred
rodič
commit
eceb7ccc3c

+ 1 - 0
wisdom-app/src/agent/agent-user-input/agent-user-input.component.ts

@@ -1,6 +1,7 @@
 import { Component, OnInit, Input } from '@angular/core';
 import { Component, OnInit, Input } from '@angular/core';
 import { ModalController, IonHeader, IonContent, IonInput, IonToolbar, IonItem, IonButtons, IonButton, IonTitle } from '@ionic/angular/standalone';
 import { ModalController, IonHeader, IonContent, IonInput, IonToolbar, IonItem, IonButtons, IonButton, IonTitle } from '@ionic/angular/standalone';
 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+
 export interface AgentUserInputField{
 export interface AgentUserInputField{
   name:string, // 字段名称
   name:string, // 字段名称
   type:string, // 输入类型
   type:string, // 输入类型

+ 1 - 1
wisdom-app/src/app/component/article-card/article-card.component.html

@@ -1,5 +1,5 @@
 <div class="card">
 <div class="card">
-  <img [src]="card.get('image')" alt="Image">
+  <img [src]="card.get('image')[0]" alt="Image">
   <div class="content">
   <div class="content">
     <h3>{{ card.get('title') }}</h3>
     <h3>{{ card.get('title') }}</h3>
     <p>{{ card.get('topic') }} &nbsp; {{ card.get('date') }}</p>
     <p>{{ card.get('topic') }} &nbsp; {{ card.get('date') }}</p>

+ 17 - 0
wisdom-app/src/app/page/data-modal/data-modal.component.html

@@ -0,0 +1,17 @@
+
+<ion-header>
+  <ion-toolbar>
+    <ion-buttons slot="start">
+      <ion-button color="medium" (click)="cancel()">取消</ion-button>
+    </ion-buttons>
+    <ion-title>用户输入</ion-title>
+    <ion-buttons slot="end">
+      <ion-button (click)="confirm()" [strong]="true">确认</ion-button>
+    </ion-buttons>
+  </ion-toolbar>
+</ion-header>
+<ion-content class="ion-padding">
+    <ion-item>
+      <ion-input labelPlacement="stacked" placeholder=""></ion-input>
+    </ion-item>
+</ion-content>

+ 0 - 0
wisdom-app/src/app/page/data-modal/data-modal.component.scss


+ 22 - 0
wisdom-app/src/app/page/data-modal/data-modal.component.spec.ts

@@ -0,0 +1,22 @@
+import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing';
+
+import { DataModalComponent } from './data-modal.component';
+
+describe('DataModalComponent', () => {
+  let component: DataModalComponent;
+  let fixture: ComponentFixture<DataModalComponent>;
+
+  beforeEach(waitForAsync(() => {
+    TestBed.configureTestingModule({
+      imports: [DataModalComponent],
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(DataModalComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  }));
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});

+ 49 - 0
wisdom-app/src/app/page/data-modal/data-modal.component.ts

@@ -0,0 +1,49 @@
+import { Component, OnInit, Input,} from '@angular/core';
+import { ModalController, IonHeader, IonContent, IonInput, IonToolbar, IonItem, IonButtons, IonButton, IonTitle } from '@ionic/angular/standalone';
+import { FormsModule, ReactiveFormsModule } from '@angular/forms';
+import { IonicModule } from '@ionic/angular';
+import { CloudObject } from 'src/lib/ncloud';
+
+@Component({
+  selector: 'app-data-modal',
+  templateUrl: './data-modal.component.html',
+  styleUrls: ['./data-modal.component.scss'],
+  standalone: true,
+  imports: [
+    IonicModule,IonHeader,IonContent,IonInput,IonToolbar,IonItem,IonButtons,IonButton,
+    IonTitle,FormsModule,ReactiveFormsModule,
+  ]
+})
+
+export class DataModalComponent  implements OnInit {
+  name: string = '';
+
+  constructor(private modalCtrl: ModalController) {
+  }
+
+  ngOnInit(){
+  }
+
+  cancel() {
+    return this.modalCtrl.dismiss(null, 'cancel');
+  }
+
+  confirm() {
+    return this.modalCtrl.dismiss(this.name, 'confirm');
+  }
+}
+
+export async function cardDisplay(modalCtrl:ModalController){
+    const modal = await modalCtrl.create({
+        component: DataModalComponent,
+        breakpoints:[0.5,0.7],
+        initialBreakpoint:0.5
+    });
+    modal.present(); // 展示模态框
+    const { role, data } = await modal.onDidDismiss(); // 等待用户关闭模态框并获取返回的数据
+    console.log(data); // 打印返回的数据
+    if (role === 'confirm') {
+        console.log('User confirmed the action');
+        return data;
+    }
+}

+ 17 - 3
wisdom-app/src/app/page/page-my-health/page-my-health.component.html

@@ -6,6 +6,20 @@
   </ion-toolbar>
   </ion-toolbar>
 </ion-header>
 </ion-header>
 
 
-<p>
-  page-my-health works!
-</p>
+<ion-content>
+  <ion-card>
+    <ion-card-header>
+      <ion-card-title>我的档案</ion-card-title>
+    </ion-card-header>
+    <ion-card-content>
+      <ion-item>
+        <ion-label position="stacked"></ion-label>
+        <ion-input  placeholder="请输入姓名"></ion-input>
+      </ion-item>
+      <ion-item>
+        <ion-label position="stacked"></ion-label>
+        <ion-input  placeholder="请输入年龄"></ion-input>
+      </ion-item>
+    </ion-card-content>
+  </ion-card>
+</ion-content>

+ 15 - 6
wisdom-app/src/app/page/page-my-health/page-my-health.component.ts

@@ -1,15 +1,24 @@
-import { Component, OnInit } from '@angular/core';
-import { Router } from '@angular/router';
-import { IonButton, IonHeader, IonToolbar } from '@ionic/angular/standalone';
+import { Component, NgModule, OnInit } from '@angular/core';
+import { ModalController, IonModal, IonHeader, IonToolbar, IonTitle, IonContent, IonList, IonItem, IonLabel, IonAvatar, IonButton, IonSegment, IonSegmentButton, IonSegmentContent, IonSegmentView, IonCardContent, IonCardTitle, IonCardHeader, IonCard, IonIcon, IonButtons, IonInput } from '@ionic/angular/standalone';
+import { addIcons } from 'ionicons';
+import { airplane, bluetooth, call, wifi } from 'ionicons/icons';
+import { CommonModule } from '@angular/common';
+import { CloudObject, CloudQuery } from 'src/lib/ncloud';
 
 
+import { Router } from '@angular/router';
+addIcons({ airplane, bluetooth, call, wifi });
 @Component({
 @Component({
   selector: 'page-my-health',
   selector: 'page-my-health',
   templateUrl: './page-my-health.component.html',
   templateUrl: './page-my-health.component.html',
   styleUrls: ['./page-my-health.component.scss'],
   styleUrls: ['./page-my-health.component.scss'],
   standalone: true,
   standalone: true,
-  imports:[
-    IonHeader,IonToolbar,IonButton
-  ]
+    imports: [
+      IonHeader, IonToolbar, IonTitle, IonContent,
+      IonLabel,IonItem,IonList,IonAvatar,CommonModule,IonButton,
+      IonSegment, IonSegmentButton,
+      IonSegmentContent,IonSegmentView,IonCardContent, IonCardTitle, IonCardHeader,IonCard,
+      IonModal,IonIcon, IonButtons,IonInput
+    ]
 })
 })
 export class PageMyHealthComponent  implements OnInit {
 export class PageMyHealthComponent  implements OnInit {
 
 

+ 11 - 2
wisdom-app/src/app/tab1/tab1.page.html

@@ -116,8 +116,17 @@ node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng serve -->
 <div>
 <div>
   <ion-card>
   <ion-card>
     <ion-card-header>
     <ion-card-header>
-      <ion-card-title>权威医生</ion-card-title>
-      <ion-card-subtitle>医生简介</ion-card-subtitle>
+      <!-- <ion-card-title>权威医生</ion-card-title> -->
+      <div class="mid-nav">
+        <div style="font-weight: bold; ">
+          <h1>权威医生</h1>
+        </div>
+        <div class="under_slide">
+          <ion-label (click)="goToViewAll()">查看全部</ion-label>
+          <ion-ripple-effect></ion-ripple-effect>
+          <ion-icon name="chevron-forward-outline"></ion-icon>
+        </div>
+      </div>
     </ion-card-header>
     </ion-card-header>
     <ion-card-content>
     <ion-card-content>
       <ion-list>
       <ion-list>

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

@@ -126,6 +126,28 @@
   border-radius: 10px;
   border-radius: 10px;
   box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
   box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
 }
 }
+
+.mid-nav {
+  display: flex;
+  justify-content: space-between;
+  margin-top: 5px;
+  margin-bottom: 5px;
+  margin-left: 15px;
+  margin-right: 15px;
+
+}
+
+.under_slide {
+  display: flex;
+  align-items: center;
+  text-align: right;
+  font-size: smaller;
+}
+
+
+
+
+
 ion-item {
 ion-item {
   margin-bottom: 12px; /* 增加医生卡片之间的间距 */
   margin-bottom: 12px; /* 增加医生卡片之间的间距 */
   padding: 12px; /* 调整卡片内边距 */
   padding: 12px; /* 调整卡片内边距 */

+ 6 - 33
wisdom-app/src/app/tab1/tab1.page.ts

@@ -1,5 +1,5 @@
 import { Component } from '@angular/core';
 import { Component } from '@angular/core';
-import { IonCardHeader, IonHeader, IonToolbar, IonTitle, IonContent, IonTabButton, IonSearchbar, IonLabel, IonItem, IonList, NavController, IonCard, IonCardTitle, IonCardSubtitle, IonCardContent, IonThumbnail } from '@ionic/angular/standalone';
+import { IonCardHeader, IonHeader, IonToolbar, IonTitle, IonContent, IonTabButton, IonSearchbar, IonLabel, IonItem, IonList, NavController, IonCard, IonCardTitle, IonCardSubtitle, IonCardContent, IonThumbnail, IonRippleEffect } from '@ionic/angular/standalone';
 import { ExploreContainerComponent } from '../explore-container/explore-container.component';
 import { ExploreContainerComponent } from '../explore-container/explore-container.component';
 import { IonButton } from '@ionic/angular/standalone';
 import { IonButton } from '@ionic/angular/standalone';
 import { IonIcon } from '@ionic/angular/standalone';
 import { IonIcon } from '@ionic/angular/standalone';
@@ -25,7 +25,7 @@ addIcons({ documentText, chatbubbles, person, calendar, newspaper,
   imports: [
   imports: [
     IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent, IonTabButton, IonButton,
     IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent, IonTabButton, IonButton,
     IonIcon,IonSearchbar,IonLabel,IonItem,IonList,CommonModule,IonCard,IonCardHeader,IonCardTitle,IonCardSubtitle,
     IonIcon,IonSearchbar,IonLabel,IonItem,IonList,CommonModule,IonCard,IonCardHeader,IonCardTitle,IonCardSubtitle,
-    IonCardContent, IonThumbnail, 
+    IonCardContent, IonThumbnail, IonRippleEffect
   ],
   ],
 })
 })
 export class Tab1Page {
 export class Tab1Page {
@@ -124,36 +124,6 @@ export class Tab1Page {
     { label: '智慧社区', icon: 'people', route: '/tabs/smart-community' }
     { label: '智慧社区', icon: 'people', route: '/tabs/smart-community' }
   ];
   ];
 
 
-  doctors = [
-    {
-      name: '余海涛',
-      age: 20,
-      position: '主任医师',
-      department: '中医草药科',
-      hospital: '南昌市江西师范医院',
-      desc:'中医大师,擅长用中药调养身体来根治病症',
-      image: '../../assets/image/doctor5.png',
-    },
-    {
-      name: '聂翼伏',
-      age: 25,
-      position: '副主任医师',
-      department: '骨科',
-      hospital: 'YY市人民医院',
-      desc:'骨科专家,擅长治疗各种骨骼损伤症状',
-      image: '../../assets/image/doctor7.png',
-    },
-    {
-      name: '徐君豪',
-      age: 28,
-      position: '主治医师',
-      department: '心理科',
-      hospital: 'XX市第一医院',
-      desc:'心理专家,擅长解决各类心理问题和疾病',
-      image: '../../assets/image/doctor6.png',
-    },
-  ];
-
   // 导航到指定路由
   // 导航到指定路由
   navigateTo(route: string) {
   navigateTo(route: string) {
     this.router.navigate([route]);
     this.router.navigate([route]);
@@ -171,7 +141,10 @@ export class Tab1Page {
     query.include("depart")
     query.include("depart")
     this.doctorList = await query.find()
     this.doctorList = await query.find()
   }
   }
-
+  goToViewAll(){
+    console.log(['route'])
+    this.router.navigate(['/tabs/inquiry/ai'])
+  }
 
 
    /** 示例:问诊根据doctor拼接提示词 */
    /** 示例:问诊根据doctor拼接提示词 */
    async openInquiry(doctor:any){
    async openInquiry(doctor:any){

+ 49 - 24
wisdom-app/src/app/tab2/tab2.page.html

@@ -67,32 +67,57 @@
   </div>
   </div>
 
 
   <!-- 底部弹出模态 -->
   <!-- 底部弹出模态 -->
-  <ion-modal [isOpen]="showDetailModal" cssClass="bottom-modal" backdropDismiss="true" (ionModalDidDismiss)="closeDetailModal()">
-    <ion-header>
-      <ion-toolbar>
-        <ion-title>详情</ion-title>
-        <ion-buttons slot="end">
-          <ion-button fill="clear" (click)="closeDetailModal()">
-            <ion-icon name="close">  X  </ion-icon>
-          </ion-button>
-        </ion-buttons>
-      </ion-toolbar>
-    </ion-header>
+  <ion-modal [isOpen]="isModalOpen" cssClass="bottom-modal">
+    <ng-template>
 
 
-    <ion-content>
-      <div class="modal-content" *ngIf="currentProduct">
-        <div class="image-container">
-          <img [src]="currentProduct.get('image')" alt="药品图片" class="medicine-image">
+      <ion-header>
+        <ion-toolbar>
+          <ion-buttons slot="start">
+            <ion-button (click)="closeDetailModal()">关闭</ion-button>
+          </ion-buttons>
+          <ion-title>{{currentProduct.get('category')}}</ion-title>
+          <ion-buttons slot="end">
+            <ion-button (click)="shareDetailModal()">分享</ion-button>
+          </ion-buttons>
+        </ion-toolbar>
+      </ion-header>
+
+      <ion-content class="ion-padding">
+        <div class="modal-content" *ngIf="currentProduct">
+          <h1 class="product-name">{{currentProduct.get('title')}}</h1>
+          <p><strong>作者:</strong>{{currentProduct.get('author')}}</p>
+          <p>{{currentProduct.get('content')[0]}}</p>
+          <div class="image-container">
+            <img style="width: 100%; height: auto;" [src]="currentProduct.get('image')[0]" alt="图片" class="medicine-image">
+          </div>
+          <p>{{currentProduct.get('content')[0]}}</p>  
+          <div class="image-container">
+            <img style="width: 100%; height: auto;" [src]="currentProduct.get('image')[0]" alt="图片" class="medicine-image">
+          </div>
+          <div style="display: flex; height: 30px; width: 100%; justify-content: space-between; align-items: center">
+            <p style="margin-left:30px"><strong>阅读量:</strong>{{currentProduct.get('views')}}</p>
+            <p style="margin-right:30px"><strong>点赞量:</strong>{{currentProduct.get('likes')}}</p>  
+          </div>
         </div>
         </div>
-        <h2 class="product-name">{{currentProduct.get('image')}}</h2>
-        <!-- <p><strong>价格:</strong>{{currentProduct.price}}</p>
-        <p><strong>是否处方药:</strong>{{currentProduct.prescription ? '是' : '否'}}</p>
-        <p><strong>用法用量:</strong>{{currentProduct.usage}}</p>
-        <p><strong>主治功能:</strong>{{currentProduct.function}}</p>
-        <p><strong>规格:</strong>{{currentProduct.spec}}</p>
-        <p><strong>成分:</strong>{{currentProduct.composition}}</p>
-        <p><strong>禁忌:</strong>{{currentProduct.taboo}}</p> -->
-      </div>
+      </ion-content>
+    </ng-template>
+  </ion-modal>
+
+  <ion-modal class="share-modal" [isOpen]="shareDetail">
+      <ion-header>
+        <ion-toolbar>
+          <ion-buttons slot="end">
+            <ion-button (click)="closeDetailModal()">X</ion-button>
+          </ion-buttons>
+          <ion-title>分享</ion-title>
+        </ion-toolbar>
+      </ion-header>
+      <ion-content>
+        <ion-item>
+          <ion-label position="stacked">分享链接</ion-label>
+          <!-- <ion-input [(ngModel)]="shareLink" readonly></ion-input> -->
+        </ion-item>
+        <ion-button expand="block" (click)="copyLink()">复制链接</ion-button>
     </ion-content>
     </ion-content>
   </ion-modal>
   </ion-modal>
 </ion-content>
 </ion-content>

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

@@ -18,11 +18,12 @@
   border: 1px solid #ccc;
   border: 1px solid #ccc;
   border-radius: 4px;
   border-radius: 4px;
 }
 }
+
 .header {
 .header {
   height: 80px;
   height: 80px;
   margin-top:-10px
   margin-top:-10px
 }
 }
-ion-content {
+.knowledge {
   height: 100%;
   height: 100%;
   width: 100%;
   width: 100%;
 }
 }
@@ -74,36 +75,35 @@ ion-segment-content {
 //   background: lightgreen;
 //   background: lightgreen;
 // }
 // }
 
 
-
+.share-modal{
+  --height: 30vh;
+  --width: 100%;
+  --offset-y: 0; /* 确保模态窗口从底部弹出 */
+}
 // 底部弹窗(modal)样式
 // 底部弹窗(modal)样式
 .bottom-modal {
 .bottom-modal {
   --height: 100vh;
   --height: 100vh;
   --width: 100%;
   --width: 100%;
-  --border-radius: 20px 20px 0 0;
   --offset-y: 0; /* 确保模态窗口从底部弹出 */
   --offset-y: 0; /* 确保模态窗口从底部弹出 */
+  
+  .modal-content {
+    padding-left: 20px;
+    padding-right: 20px;
+  }
+  
+  .image-container {
+    display: flex;
+    justify-content: center;
+    margin-bottom: 16px;
+  }
+  
+  .medicine-image {
+    object-fit: cover;
+    border-radius: 8px;
+  }
 }
 }
 
 
-.modal-content {
-  padding: 16px;
-}
-
-.image-container {
-  display: flex;
-  justify-content: center;
-  margin-bottom: 16px;
-}
-
-.medicine-image {
-  width: 120px;
-  height: 120px;
-  object-fit: cover;
-  border-radius: 8px;
-}
 
 
-ion-button {
-  --padding-start: 0;
-  --padding-end: 0;
-}
 
 
 
 
 
 

+ 40 - 44
wisdom-app/src/app/tab2/tab2.page.ts

@@ -6,20 +6,12 @@ import { airplane, bluetooth, call, wifi } from 'ionicons/icons';
 import { ArticleCardComponent } from '../component/article-card/article-card.component';
 import { ArticleCardComponent } from '../component/article-card/article-card.component';
 import { CommonModule } from '@angular/common';
 import { CommonModule } from '@angular/common';
 import { CloudObject, CloudQuery } from 'src/lib/ncloud';
 import { CloudObject, CloudQuery } from 'src/lib/ncloud';
-import { FormsModule } from '@angular/forms';
 import { NavigationLanComponent } from '../component/navigation-lan/navigation-lan.component';
 import { NavigationLanComponent } from '../component/navigation-lan/navigation-lan.component';
 import { Router } from '@angular/router';
 import { Router } from '@angular/router';
+import { cardDisplay } from '../page/data-modal/data-modal.component';
+import { openUserLoginModal } from 'src/lib/user/modal-user-login/modal-user-login.component';
 addIcons({ airplane, bluetooth, call, wifi });
 addIcons({ airplane, bluetooth, call, wifi });
 
 
-interface Article {
-  image: string;
-  title: string;
-  category: string;
-  date: string;
-  views: number;
-  likes: number;
-}
-
 @Component({
 @Component({
   selector: 'app-tab2',
   selector: 'app-tab2',
   templateUrl: 'tab2.page.html',
   templateUrl: 'tab2.page.html',
@@ -30,31 +22,45 @@ interface Article {
     IonLabel,IonItem,IonList,IonAvatar,ArticleCardComponent,CommonModule,IonButton,
     IonLabel,IonItem,IonList,IonAvatar,ArticleCardComponent,CommonModule,IonButton,
     IonSegment, IonSegmentButton,NavigationLanComponent,
     IonSegment, IonSegmentButton,NavigationLanComponent,
     IonSegmentContent,IonSegmentView,IonCardContent, IonCardTitle, IonCardHeader,IonCard,
     IonSegmentContent,IonSegmentView,IonCardContent, IonCardTitle, IonCardHeader,IonCard,
-    IonModal,IonIcon, IonButtons
+    IonModal,IonIcon, IonButtons,
   ]
   ]
 })
 })
 
 
 export class Tab2Page {
 export class Tab2Page {
 
 
-  showDetailModal = false;  // 控制模态显示与否
+  isModalOpen = false;
   currentProduct: any;      // 当前选择的科普信息
   currentProduct: any;      // 当前选择的科普信息
-
-  openDetailModal(product: any) {
+  openDetailModal(product?: any) {
+    this.isModalOpen = true;
     this.currentProduct = product;
     this.currentProduct = product;
-    this.showDetailModal = true;
   }
   }
-
   closeDetailModal() {
   closeDetailModal() {
-    this.showDetailModal = false;
+    this.isModalOpen = false;
     this.currentProduct = null;
     this.currentProduct = null;
   }
   }
-
-  type:"hotdot"|"export"|"sleep"|"lift"|"male"|"female" = "hotdot"
-  typeChange(ev:any){
-    this.type = ev?.detail?.value || ev?.value || 'hotdot'
-    console.log(this.type)
+  shareDetail = false;
+  shareDetailModal() {
+    this.shareDetail = true;
+    // 在这里确保模态框的aria-hidden属性被正确处理
+    setTimeout(() => {
+      const modalElement = document.querySelector('ion-modal');
+      if (modalElement) {
+        modalElement.setAttribute('aria-hidden', 'false');
+      }
+    }, 0);
+  }
+  closeShareModal(){
+    this.shareDetail = false;
+      // 在这里确保模态框关闭时处理aria-hidden属性
+    const modalElement = document.querySelector('ion-modal');
+    if (modalElement) {
+      modalElement.setAttribute('aria-hidden', 'true');
+    }
   }
   }
-  // constructor(private modalCtrl:ModalController) { }
+  copyLink() {
+    console.log('复制链接');
+  }
+  type:"hotdot"|"export"|"sleep"|"lift"|"male"|"female" = "hotdot"
 
 
   constructor(
   constructor(
     private modalCtrl:ModalController,
     private modalCtrl:ModalController,
@@ -62,28 +68,18 @@ export class Tab2Page {
   ) { }
   ) { }
 
 
   cards: Array<CloudObject> = [];
   cards: Array<CloudObject> = [];
-  async loadCards() {
-    let query = new CloudQuery('HotDot');
-    // query.equalTo('category', 'HotDot');
-    // query.greaterThan('views', 1000); // 查询 views 大于 1000 的文章
-    if (this.type == 'hotdot') {
-
-    }
-    if (this.type == 'hotdot') {
-
-    }
-    if (this.type == 'hotdot') {
+  typeChange(ev: any) {
+    this.type = ev?.detail?.value || ev?.value || 'hotdot';
+    console.log(this.type);
+    this.loadCards(); // 重新加载卡片
+  }
 
 
-    }
-    if (this.type == 'male') {
-      query.equalTo('category', 'MaleHealth')
-    }
-    if (this.type == 'female') {
-      query.equalTo("category", "FemaleHealth")
-    }
-    // query.greaterThan('views', 1000); // 查询 views 大于 1000 的文章
-    this.cards = await query.find();
-    console.log(this.cards);
+  async loadCards() {
+    const query = new CloudQuery('HotDot');
+    // if (this.type) {
+    //   query.equalTo('category', this.type); // 根据选择的类型设置查询条件
+    // }
+    this.cards = await query.find(); // 执行查询并获取结果
   }
   }
 
 
   ngOnInit() {
   ngOnInit() {

+ 21 - 3
wisdom-app/src/app/tabs/tabs.page.ts

@@ -2,7 +2,16 @@ import { Component, EnvironmentInjector, inject } from '@angular/core';
 import { IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel } from '@ionic/angular/standalone';
 import { IonTabs, IonTabBar, IonTabButton, IonIcon, IonLabel } from '@ionic/angular/standalone';
 import { addIcons } from 'ionicons';
 import { addIcons } from 'ionicons';
 import { home, accessibility,cart, person } from 'ionicons/icons';
 import { home, accessibility,cart, person } from 'ionicons/icons';
-
+import {
+  compassOutline, bookOutline, book, storefront, personOutline, documentOutline,
+  mailOutline, calendarOutline, logoUsd, briefcaseOutline, heartOutline, footballOutline,
+  chevronForwardOutline, storefrontOutline, businessOutline, documentsOutline,
+  rocketOutline, sparklesOutline, medalOutline, listOutline, giftOutline,
+  scanOutline, settingsOutline, heartCircleOutline, walletOutline, bagRemoveOutline,
+  folderOutline, readerOutline, cartOutline, thumbsUpOutline, ticketOutline, documentTextOutline,
+  timeOutline, cloudDownloadOutline, bagCheckOutline, cardOutline, searchOutline, menuOutline,
+  addCircleOutline, addOutline, optionsOutline
+} from 'ionicons/icons';
 @Component({
 @Component({
   selector: 'app-tabs',
   selector: 'app-tabs',
   templateUrl: 'tabs.page.html',
   templateUrl: 'tabs.page.html',
@@ -13,7 +22,16 @@ import { home, accessibility,cart, person } from 'ionicons/icons';
 export class TabsPage {
 export class TabsPage {
   public environmentInjector = inject(EnvironmentInjector);
   public environmentInjector = inject(EnvironmentInjector);
 
 
-  constructor() {
-    addIcons({ home,accessibility,cart,person });
+    constructor() {
+      addIcons({
+        compassOutline, bookOutline, book, storefront, personOutline, documentOutline,
+        mailOutline, calendarOutline, logoUsd, briefcaseOutline, heartOutline,
+        footballOutline, chevronForwardOutline, storefrontOutline, businessOutline,
+        documentsOutline, rocketOutline, sparklesOutline, medalOutline, listOutline,
+        giftOutline, scanOutline, settingsOutline, heartCircleOutline, walletOutline,
+        bagRemoveOutline, folderOutline, readerOutline, cartOutline, thumbsUpOutline,
+        ticketOutline, documentTextOutline, timeOutline, cloudDownloadOutline, bagCheckOutline,
+        cardOutline, searchOutline, menuOutline, addCircleOutline, addOutline, optionsOutline
+      });
   }
   }
 }
 }

+ 23 - 12
wisdom-app/src/lib/ncloud.ts

@@ -87,7 +87,7 @@ export class CloudQuery {
     constructor(className: string) {
     constructor(className: string) {
         this.className = className;
         this.className = className;
     }
     }
-
+    // 作用是将查询参数转换为对象
     include(...fileds:string[]) {
     include(...fileds:string[]) {
         this.queryParams["include"] = fileds;
         this.queryParams["include"] = fileds;
     }
     }
@@ -130,7 +130,14 @@ export class CloudQuery {
         });
         });
 
 
         const json = await response?.json();
         const json = await response?.json();
-        return json || {};
+        // return json || {};
+        const exists = json?.results?.[0] || null;
+        if (exists) {
+            let existsObject = this.dataToObj(exists)
+            return existsObject;
+        }
+        return null
+
     }
     }
 
 
     async find() {
     async find() {
@@ -138,19 +145,20 @@ export class CloudQuery {
 
 
         let queryStr = ``
         let queryStr = ``
         Object.keys(this.queryParams).forEach(key=>{
         Object.keys(this.queryParams).forEach(key=>{
-            let paramStr = JSON.stringify(this.queryParams[key]);
+            let paramStr = JSON.stringify(this.queryParams[key]); // 作用是将对象转换为JSON字符串
             if(key=="include"){
             if(key=="include"){
                 paramStr = this.queryParams[key]?.join(",")
                 paramStr = this.queryParams[key]?.join(",")
             }
             }
+            if(key=="where"){
+                paramStr = JSON.stringify(this.queryParams[key]);
+
+            }
             if(queryStr) {
             if(queryStr) {
                 url += `${key}=${paramStr}`;
                 url += `${key}=${paramStr}`;
             }else{
             }else{
                 url += `&${key}=${paramStr}`;
                 url += `&${key}=${paramStr}`;
             }
             }
         })
         })
-        // if (Object.keys(this.queryParams["where"]).length) {
-            
-        // }
 
 
         const response = await fetch(url, {
         const response = await fetch(url, {
             headers: {
             headers: {
@@ -190,12 +198,15 @@ export class CloudQuery {
         });
         });
 
 
         const json = await response?.json();
         const json = await response?.json();
-        const exists = json?.results?.[0] || null;
-        if (exists) {
-            let existsObject = this.dataToObj(exists)
-            return existsObject;
-        }
-        return null
+        // const exists = json?.results?.[0] || null;
+        // if (exists) {
+        //     let existsObject = this.dataToObj(exists)
+        //     return existsObject;
+        // }
+        // return null
+        let list = json?.results || []
+        let objList = list.map((item:any)=>this.dataToObj(item))
+        return objList || [];
     }
     }
 
 
     dataToObj(exists:any):CloudObject{
     dataToObj(exists:any):CloudObject{

+ 3 - 1
wisdom-app/src/lib/user/modal-user-login/modal-user-login.component.ts

@@ -33,7 +33,9 @@ export class ModalUserLoginComponent  implements OnInit {
   password2Change(ev:any){
   password2Change(ev:any){
     this.password2 = ev?.detail?.value
     this.password2 = ev?.detail?.value
   }
   }
-  constructor(private modalCtrl:ModalController) { }
+  constructor(private modalCtrl:ModalController) {
+    console.log(this.type)
+   }
 
 
   ngOnInit() {}
   ngOnInit() {}
 
 

+ 120 - 30
wisdom-server/migration/data.js

@@ -151,9 +151,15 @@ module.exports.HotDotList = [
   {
   {
       "objectId": "001",
       "objectId": "001",
       "category": "HotDot",
       "category": "HotDot",
-      "image": "https://ts1.cn.mm.bing.net/th/id/R-C.604489b58d051acbf08b082baed5240b?rik=2wfk1JgczvfOQw&riu=http%3a%2f%2fpsy.china.com.cn%2fpic%2f2023-09%2f05%2f22937582-f9a1-4bfd-8f19-cc0d7369ac02.jpg&ehk=cN5yrGkIBYJHeeT8KaPLeUcl5XmS5rnUh2pSPyVqdjM%3d&risl=&pid=ImgRaw&r=0",
+      "image": [
+        "https://ts1.cn.mm.bing.net/th/id/R-C.604489b58d051acbf08b082baed5240b?rik=2wfk1JgczvfOQw&riu=http%3a%2f%2fpsy.china.com.cn%2fpic%2f2023-09%2f05%2f22937582-f9a1-4bfd-8f19-cc0d7369ac02.jpg&ehk=cN5yrGkIBYJHeeT8KaPLeUcl5XmS5rnUh2pSPyVqdjM%3d&risl=&pid=ImgRaw&r=0",
+        "https://ts1.cn.mm.bing.net/th/id/R-C.604489b58d051acbf08b082baed5240b?rik=2wfk1JgczvfOQw&riu=http%3a%2f%2fpsy.china.com.cn%2fpic%2f2023-09%2f05%2f22937582-f9a1-4bfd-8f19-cc0d7369ac02.jpg&ehk=cN5yrGkIBYJHeeT8KaPLeUcl5XmS5rnUh2pSPyVqdjM%3d&risl=&pid=ImgRaw&r=0",
+      ],
       "title": "如何保持心理健康",
       "title": "如何保持心理健康",
-      "content": "在现代社会中,保持心理健康变得尤为重要。本文将探讨一些有效的方法来管理压力和焦虑。",
+      "content":[
+        "在现代社会中,保持心理健康变得尤为重要。本文将探讨一些有效的方法来管理压力和焦虑。",
+        "在现代社会中,保持心理健康变得尤为重要。本文将探讨一些有效的方法来管理压力和焦虑。",
+      ],
       "topic": "心理健康",
       "topic": "心理健康",
       "date": "2024-12-14T10:00:00Z",
       "date": "2024-12-14T10:00:00Z",
       "author": ["张伟", "李娜"],
       "author": ["张伟", "李娜"],
@@ -163,9 +169,15 @@ module.exports.HotDotList = [
   {
   {
       "objectId": "002",
       "objectId": "002",
       "category": "HotDot",
       "category": "HotDot",
-      "image": "https://tse3-mm.cn.bing.net/th/id/OIP-C.C39QnSPshcJxgj1efBr75QHaFp?w=226&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+      "image": [
+          "https://tse3-mm.cn.bing.net/th/id/OIP-C.C39QnSPshcJxgj1efBr75QHaFp?w=226&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+          "https://tse3-mm.cn.bing.net/th/id/OIP-C.C39QnSPshcJxgj1efBr75QHaFp?w=226&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+      ],
       "title": "冬季养生:如何增强免疫力",
       "title": "冬季养生:如何增强免疫力",
-      "content": "冬季是流感和感冒的高发季节,本文提供一些增强免疫力的建议,包括饮食和生活习惯的调整。",
+      "content":[
+        "冬季是流感和感冒的高发季节,本文提供一些增强免疫力的建议,包括饮食和生活习惯的调整。",
+        "冬季是流感和感冒的高发季节,本文提供一些增强免疫力的建议,包括饮食和生活习惯的调整。",
+      ], 
       "topic": "健康养生",
       "topic": "健康养生",
       "date": "2024-12-13T14:30:00Z",
       "date": "2024-12-13T14:30:00Z",
       "author": ["王芳"],
       "author": ["王芳"],
@@ -175,9 +187,15 @@ module.exports.HotDotList = [
   {
   {
       "objectId": "003",
       "objectId": "003",
       "category": "HotDot",
       "category": "HotDot",
-      "image": "https://img-s-msn-com.akamaized.net/tenant/amp/entityid/AA1vwPs7.img?w=640&h=426&m=6",
+      "image": [
+        "https://img-s-msn-com.akamaized.net/tenant/amp/entityid/AA1vwPs7.img?w=640&h=426&m=6",
+        "https://img-s-msn-com.akamaized.net/tenant/amp/entityid/AA1vwPs7.img?w=640&h=426&m=6",
+      ],
       "title": "运动与健康:每周锻炼的益处",
       "title": "运动与健康:每周锻炼的益处",
-      "content": "定期锻炼对身体健康至关重要。本文将讨论每周锻炼的多重好处,以及如何制定适合自己的运动计划。",
+      "content":[
+        "定期锻炼对身体健康至关重要。本文将讨论每周锻炼的多重好处,以及如何制定适合自己的运动计划。",
+        "定期锻炼对身体健康至关重要。本文将讨论每周锻炼的多重好处,以及如何制定适合自己的运动计划。",
+      ], 
       "topic": "运动健康",
       "topic": "运动健康",
       "date": "2024-12-12T09:15:00Z",
       "date": "2024-12-12T09:15:00Z",
       "author": ["赵强", "刘洋"],
       "author": ["赵强", "刘洋"],
@@ -187,9 +205,15 @@ module.exports.HotDotList = [
   {
   {
       "objectId": "004",
       "objectId": "004",
       "category": "HotDot",
       "category": "HotDot",
-      "image": "https://th.bing.com/th?&id=OVP.Xw33st6_8Ujcv6teydlQDwEsC7&w=285&h=160&c=7&pid=2.1&rs=1",
+      "image":[
+        "https://th.bing.com/th?&id=OVP.Xw33st6_8Ujcv6teydlQDwEsC7&w=285&h=160&c=7&pid=2.1&rs=1",
+        "https://th.bing.com/th?&id=OVP.Xw33st6_8Ujcv6teydlQDwEsC7&w=285&h=160&c=7&pid=2.1&rs=1",
+      ],
       "title": "饮食与心理:食物如何影响情绪",
       "title": "饮食与心理:食物如何影响情绪",
-      "content": "我们的饮食习惯与心理健康息息相关。本文探讨了哪些食物可以改善情绪,哪些应尽量避免。",
+      "content": [
+        "我们的饮食习惯与心理健康息息相关。本文探讨了哪些食物可以改善情绪,哪些应尽量避免。",
+        "我们的饮食习惯与心理健康息息相关。本文探讨了哪些食物可以改善情绪,哪些应尽量避免。",
+      ],
       "topic": "饮食心理",
       "topic": "饮食心理",
       "date": "2024-12-11T11:45:00Z",
       "date": "2024-12-11T11:45:00Z",
       "author": ["陈刚"],
       "author": ["陈刚"],
@@ -199,9 +223,15 @@ module.exports.HotDotList = [
   {
   {
       "objectId": "005",
       "objectId": "005",
       "category": "HotDot",
       "category": "HotDot",
-      "image": "https://tse3-mm.cn.bing.net/th/id/OIP-C._S3n4LWflXFG5drI2J8kywHaE8?w=288&h=192&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+      "image":[
+        "https://tse3-mm.cn.bing.net/th/id/OIP-C._S3n4LWflXFG5drI2J8kywHaE8?w=288&h=192&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+        "https://tse3-mm.cn.bing.net/th/id/OIP-C._S3n4LWflXFG5drI2J8kywHaE8?w=288&h=192&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+      ], 
       "title": "老年人的健康管理",
       "title": "老年人的健康管理",
-      "content": "随着年龄的增长,健康管理变得尤为重要。本文将介绍老年人应注意的健康问题及管理策略。",
+      "content": [
+        "随着年龄的增长,健康管理变得尤为重要。本文将介绍老年人应注意的健康问题及管理策略。",
+        "随着年龄的增长,健康管理变得尤为重要。本文将介绍老年人应注意的健康问题及管理策略。",
+      ],
       "topic": "老年健康",
       "topic": "老年健康",
       "date": "2024-12-10T08:30:00Z",
       "date": "2024-12-10T08:30:00Z",
       "author": ["李静", "王平"],
       "author": ["李静", "王平"],
@@ -211,9 +241,15 @@ module.exports.HotDotList = [
   {
   {
     "objectId": "006",
     "objectId": "006",
     "category": "MaleHealth",
     "category": "MaleHealth",
-    "image": "https://example.com/malehealth1.jpg",
+    "image": [
+      "https://tse2-mm.cn.bing.net/th/id/OIP-C._KTGsHeAx59Kt4xEjm2cogHaE7?w=255&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+      "https://tse2-mm.cn.bing.net/th/id/OIP-C._KTGsHeAx59Kt4xEjm2cogHaE7?w=255&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+    ],
     "title": "男性健康:如何管理压力",
     "title": "男性健康:如何管理压力",
-    "content": "男性在生活和工作中面临着各种压力,如何有效管理这些压力是保持身心健康的关键。本文提供了一些实用的方法和技巧。",
+    "content":[
+      "男性在生活和工作中面临着各种压力,如何有效管理这些压力是保持身心健康的关键。本文提供了一些实用的方法和技巧。",
+      "男性在生活和工作中面临着各种压力,如何有效管理这些压力是保持身心健康的关键。本文提供了一些实用的方法和技巧。",
+    ], 
     "topic": "心理健康",
     "topic": "心理健康",
     "date": "2024-12-14T10:00:00Z",
     "date": "2024-12-14T10:00:00Z",
     "author": ["张伟", "李强"],
     "author": ["张伟", "李强"],
@@ -223,9 +259,15 @@ module.exports.HotDotList = [
   {
   {
     "objectId": "007",
     "objectId": "007",
     "category": "MaleHealth",
     "category": "MaleHealth",
-    "image": "https://example.com/malehealth2.jpg",
+    "image": [
+      "https://tse2-mm.cn.bing.net/th/id/OIP-C.l1dQeIyxyPALZaTiVBtiXgAAAA?w=242&h=181&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+      "https://tse2-mm.cn.bing.net/th/id/OIP-C.l1dQeIyxyPALZaTiVBtiXgAAAA?w=242&h=181&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+    ],
     "title": "提升男性生育力的饮食建议",
     "title": "提升男性生育力的饮食建议",
-    "content": "饮食对男性的生育力有着重要影响。本文将介绍一些有助于提高生育力的食物,以及应避免的饮食习惯。",
+    "content": [
+      "饮食对男性的生育力有着重要影响。本文将介绍一些有助于提高生育力的食物,以及应避免的饮食习惯。",
+      "饮食对男性的生育力有着重要影响。本文将介绍一些有助于提高生育力的食物,以及应避免的饮食习惯。",
+    ],
     "topic": "生育健康",
     "topic": "生育健康",
     "date": "2024-12-13T14:30:00Z",
     "date": "2024-12-13T14:30:00Z",
     "author": ["王芳"],
     "author": ["王芳"],
@@ -235,9 +277,15 @@ module.exports.HotDotList = [
   {
   {
     "objectId": "008",
     "objectId": "008",
     "category": "MaleHealth",
     "category": "MaleHealth",
-    "image": "https://example.com/malehealth3.jpg",
+    "image": [
+        "https://tse3-mm.cn.bing.net/th/id/OIP-C.dR38QAUd5jOWiG69Xe_IoAHaEK?w=332&h=186&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+        "https://tse3-mm.cn.bing.net/th/id/OIP-C.dR38QAUd5jOWiG69Xe_IoAHaEK?w=332&h=186&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+    ],
     "title": "男性如何应对性功能障碍",
     "title": "男性如何应对性功能障碍",
-    "content": "性功能障碍是许多男性面临的问题。本文将探讨其可能的原因及有效的应对策略,包括心理咨询和医疗建议。",
+    "content":[
+        "性功能障碍是许多男性面临的问题。本文将探讨其可能的原因及有效的应对策略,包括心理咨询和医疗建议。",
+        "性功能障碍是许多男性面临的问题。本文将探讨其可能的原因及有效的应对策略,包括心理咨询和医疗建议。",
+    ], 
     "topic": "性健康",
     "topic": "性健康",
     "date": "2024-12-12T09:15:00Z",
     "date": "2024-12-12T09:15:00Z",
     "author": ["赵强", "刘洋"],
     "author": ["赵强", "刘洋"],
@@ -247,9 +295,15 @@ module.exports.HotDotList = [
   {
   {
     "objectId": "009",
     "objectId": "009",
     "category": "MaleHealth",
     "category": "MaleHealth",
-    "image": "https://example.com/malehealth4.jpg",
+    "image": [
+      ,"https://tse2-mm.cn.bing.net/th/id/OIP-C.qtSI2MxirDPZ3dnzMYA7JwHaEJ?w=299&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+      ,"https://tse2-mm.cn.bing.net/th/id/OIP-C.qtSI2MxirDPZ3dnzMYA7JwHaEJ?w=299&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+    ],
     "title": "男性学习:如何提高注意力",
     "title": "男性学习:如何提高注意力",
-    "content": "在快节奏的生活中,男性如何提高注意力和学习效率是一个重要课题。本文将分享一些提高注意力的技巧和方法。",
+    "content": [
+      "在快节奏的生活中,男性如何提高注意力和学习效率是一个重要课题。本文将分享一些提高注意力的技巧和方法。",
+      "在快节奏的生活中,男性如何提高注意力和学习效率是一个重要课题。本文将分享一些提高注意力的技巧和方法。",
+    ],
     "topic": "学习与成长",
     "topic": "学习与成长",
     "date": "2024-12-11T11:45:00Z",
     "date": "2024-12-11T11:45:00Z",
     "author": ["陈刚"],
     "author": ["陈刚"],
@@ -259,9 +313,15 @@ module.exports.HotDotList = [
   {
   {
     "objectId": "010",
     "objectId": "010",
     "category": "MaleHealth",
     "category": "MaleHealth",
-    "image": "https://example.com/malehealth5.jpg",
+    "image": [
+      "https://tse1-mm.cn.bing.net/th/id/OIP-C.RHf1zF-USugzQAcAWpHzFQHaE8?w=278&h=185&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+      "https://tse1-mm.cn.bing.net/th/id/OIP-C.RHf1zF-USugzQAcAWpHzFQHaE8?w=278&h=185&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+    ],
     "title": "男性的健康体检:你需要知道的",
     "title": "男性的健康体检:你需要知道的",
-    "content": "定期体检对男性健康至关重要。本文将介绍男性在不同年龄阶段应关注的健���检查项目及其重要性。",
+    "content": [
+      "定期体检对男性健康至关重要。本文将介绍男性在不同年龄阶段应关注的健���检查项目及其重要性。",
+      "定期体检对男性健康至关重要。本文将介绍男性在不同年龄阶段应关注的健���检查项目及其重要性。",
+    ],
     "topic": "健康管理",
     "topic": "健康管理",
     "date": "2024-12-10T08:30:00Z",
     "date": "2024-12-10T08:30:00Z",
     "author": ["李静", "王平"],
     "author": ["李静", "王平"],
@@ -271,9 +331,15 @@ module.exports.HotDotList = [
   {
   {
     "objectId": "011",
     "objectId": "011",
     "category": "FemaleHealth",
     "category": "FemaleHealth",
-    "image": "https://example.com/femalehealth1.jpg",
+    "image": [
+      "https://tse4-mm.cn.bing.net/th/id/OIP-C.nOd84Z9D7PC5hoIgeodnugHaD4?w=311&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+      "https://tse4-mm.cn.bing.net/th/id/OIP-C.nOd84Z9D7PC5hoIgeodnugHaD4?w=311&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+    ],
     "title": "女性健康:月经周期的管理",
     "title": "女性健康:月经周期的管理",
-    "content": "了解和管理月经周期对女性健康至关重要。本文将探讨如何更好地理解月经周期及其对身体的影响。",
+    "content": [
+      "了解和管理月经周期对女性健康至关重要。本文将探讨如何更好地理解月经周期及其对身体的影响。",
+      "了解和管理月经周期对女性健康至关重要。本文将探讨如何更好地理解月经周期及其对身体的影响。",
+    ],
     "topic": "生理健康",
     "topic": "生理健康",
     "date": "2024-12-14T10:00:00Z",
     "date": "2024-12-14T10:00:00Z",
     "author": ["张伟", "李娜"],
     "author": ["张伟", "李娜"],
@@ -283,9 +349,15 @@ module.exports.HotDotList = [
   {
   {
     "objectId": "012",
     "objectId": "012",
     "category": "FemaleHealth",
     "category": "FemaleHealth",
-    "image": "https://example.com/femalehealth2.jpg",
+    "image": [
+      "https://tse3-mm.cn.bing.net/th/id/OIP-C.Q2fxtDDrhabybZqttwNBrAHaE8?w=283&h=189&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+      "https://tse3-mm.cn.bing.net/th/id/OIP-C.Q2fxtDDrhabybZqttwNBrAHaE8?w=283&h=189&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+    ],
     "title": "女性心理健康:应对焦虑与压力",
     "title": "女性心理健康:应对焦虑与压力",
-    "content": "女性在生活中常常面临各种压力,了解应对焦虑的方法非常重要。本文将提供实用的建议,帮助女性管理心理健康。",
+    "content": [
+      "女性在生活中常常面临各种压力,了解应对焦虑的方法非常重要。本文将提供实用的建议,帮助女性管理心理健康。",
+      "女性在生活中常常面临各种压力,了解应对焦虑的方法非常重要。本文将提供实用的建议,帮助女性管理心理健康。",
+    ],
     "topic": "心理健康",
     "topic": "心理健康",
     "date": "2024-12-13T14:30:00Z",
     "date": "2024-12-13T14:30:00Z",
     "author": ["王芳"],
     "author": ["王芳"],
@@ -295,9 +367,15 @@ module.exports.HotDotList = [
   {
   {
     "objectId": "013",
     "objectId": "013",
     "category": "FemaleHealth",
     "category": "FemaleHealth",
-    "image": "https://example.com/femalehealth3.jpg",
+    "image":[
+      "https://tse4-mm.cn.bing.net/th/id/OIP-C.HxvLdprK1bczivOdSCG2DgHaE8?w=268&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+      "https://tse4-mm.cn.bing.net/th/id/OIP-C.HxvLdprK1bczivOdSCG2DgHaE8?w=268&h=180&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+    ],
     "title": "孕期保健:健康饮食与锻炼",
     "title": "孕期保健:健康饮食与锻炼",
-    "content": "孕期是女性生命中重要的阶段,合理的饮食与适当的锻炼对母婴健康至关重要。本文将介绍孕期的饮食和锻炼建议。",
+    "content":[
+      "孕期是女性生命中重要的阶段,合理的饮食与适当的锻炼对母婴健康至关重要。本文将介绍孕期的饮食和锻炼建议。",
+      "孕期是女性生命中重要的阶段,合理的饮食与适当的锻炼对母婴健康至关重要。本文将介绍孕期的饮食和锻炼建议。",
+    ], 
     "topic": "孕产健康",
     "topic": "孕产健康",
     "date": "2024-12-12T09:15:00Z",
     "date": "2024-12-12T09:15:00Z",
     "author": ["赵强", "陈刚"],
     "author": ["赵强", "陈刚"],
@@ -307,9 +385,15 @@ module.exports.HotDotList = [
   {
   {
     "objectId": "014",
     "objectId": "014",
     "category": "FemaleHealth",
     "category": "FemaleHealth",
-    "image": "https://example.com/femalehealth4.jpg",
+    "image": [
+      "https://tse2-mm.cn.bing.net/th/id/OIP-C._1Pm5qOmAmfSCPHoCyTSKwHaE8?w=272&h=182&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+      "https://tse2-mm.cn.bing.net/th/id/OIP-C._1Pm5qOmAmfSCPHoCyTSKwHaE8?w=272&h=182&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+    ],
     "title": "女性生育力与年龄的关系",
     "title": "女性生育力与年龄的关系",
-    "content": "女性的生育力与年龄密切相关。本文将探讨年龄对生育力的影响以及如何在不同年龄段保持生育健康。",
+    "content":[
+      "女性的生育力与年龄密切相关。本文将探讨年龄对生育力的影响以及如何在不同年龄段保持生育健康。",
+      "女性的生育力与年龄密切相关。本文将探讨年龄对生育力的影响以及如何在不同年龄段保持生育健康。",
+    ], 
     "topic": "生育健康",
     "topic": "生育健康",
     "date": "2024-12-11T11:45:00Z",
     "date": "2024-12-11T11:45:00Z",
     "author": ["李静"],
     "author": ["李静"],
@@ -319,9 +403,15 @@ module.exports.HotDotList = [
   {
   {
     "objectId": "015",
     "objectId": "015",
     "category": "FemaleHealth",
     "category": "FemaleHealth",
-    "image": "https://example.com/femalehealth5.jpg",
+    "image":[
+      "https://tse4-mm.cn.bing.net/th/id/OIP-C.74wiGMbU6culgvNnPHzY9QHaE7?w=274&h=183&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+      "https://tse4-mm.cn.bing.net/th/id/OIP-C.74wiGMbU6culgvNnPHzY9QHaE7?w=274&h=183&c=7&r=0&o=5&dpr=1.5&pid=1.7",
+    ],
     "title": "女性职场中的心理健康",
     "title": "女性职场中的心理健康",
-    "content": "在职场中,女性常常面临独特的挑战。本文将探讨如何在职场中维护心理健康,提升工作效率。",
+    "content":[
+      "在职场中,女性常常面临独特的挑战。本文将探讨如何在职场中维护心理健康,提升工作效率。",
+      "在职场中,女性常常面临独特的挑战。本文将探讨如何在职场中维护心理健康,提升工作效率。",
+    ], 
     "topic": "职场心理",
     "topic": "职场心理",
     "date": "2024-12-10T08:30:00Z",
     "date": "2024-12-10T08:30:00Z",
     "author": ["王平", "李强"],
     "author": ["王平", "李强"],

+ 5 - 5
wisdom-server/migration/import-data.js

@@ -24,11 +24,11 @@ async function inportDapartAndDoctor(){
     // }
     // }
 
 
     // 导入热点数据
     // 导入热点数据
-    // let hotDotList = HotDotList
-    // for (let index = 0; index < hotDotList.length; index++) {
-    //     let hotDot = hotDotList[index];
-    //     hotDot = await importObject("HotDot",hotDot)
-    // }
+    let hotDotList = HotDotList
+    for (let index = 0; index < hotDotList.length; index++) {
+        let hotDot = hotDotList[index];
+        hotDot = await importObject("HotDot",hotDot)
+    }
     let query = new CloudQuery('HotDot');
     let query = new CloudQuery('HotDot');
     query.equalTo('category', 'HotDot');
     query.equalTo('category', 'HotDot');
     console.log(await query.find())
     console.log(await query.find())