Ver Fonte

Merge branch 'master' of http://git.fmode.cn:3000/yuebuzu/s202226701018

惊鸿戏梦 há 4 meses atrás
pai
commit
f0b6672364

+ 71 - 4
wisdom-app/angular.json

@@ -31,7 +31,43 @@
                 "output": "assets"
               }
             ],
-            "styles": ["src/global.scss", "src/theme/variables.scss"],
+            "styles": [
+              "src/global.scss",
+              "src/theme/variables.scss",
+              {
+                "input": "node_modules/@ionic/angular/css/core.css"
+              },
+              {
+                "input": "node_modules/@ionic/angular/css/normalize.css"
+              },
+              {
+                "input": "node_modules/@ionic/angular/css/structure.css"
+              },
+              {
+                "input": "node_modules/@ionic/angular/css/typography.css"
+              },
+              {
+                "input": "node_modules/@ionic/angular/css/display.css"
+              },
+              {
+                "input": "node_modules/@ionic/angular/css/padding.css"
+              },
+              {
+                "input": "node_modules/@ionic/angular/css/float-elements.css"
+              },
+              {
+                "input": "node_modules/@ionic/angular/css/text-alignment.css"
+              },
+              {
+                "input": "node_modules/@ionic/angular/css/text-transformation.css"
+              },
+              {
+                "input": "node_modules/@ionic/angular/css/flex-utils.css"
+              },
+              {
+                "input": "src/theme/variables.css"
+              }
+            ],
             "scripts": []
           },
           "configurations": {
@@ -106,7 +142,10 @@
                 "output": "assets"
               }
             ],
-            "styles": ["src/global.scss", "src/theme/variables.scss"],
+            "styles": [
+              "src/global.scss",
+              "src/theme/variables.scss"
+            ],
             "scripts": []
           },
           "configurations": {
@@ -119,7 +158,34 @@
         "lint": {
           "builder": "@angular-eslint/builder:lint",
           "options": {
-            "lintFilePatterns": ["src/**/*.ts", "src/**/*.html"]
+            "lintFilePatterns": [
+              "src/**/*.ts",
+              "src/**/*.html"
+            ]
+          }
+        },
+        "ionic-cordova-serve": {
+          "builder": "@ionic/angular-toolkit:cordova-serve",
+          "options": {
+            "cordovaBuildTarget": "app:ionic-cordova-build",
+            "devServerTarget": "app:serve"
+          },
+          "configurations": {
+            "production": {
+              "cordovaBuildTarget": "app:ionic-cordova-build:production",
+              "devServerTarget": "app:serve:production"
+            }
+          }
+        },
+        "ionic-cordova-build": {
+          "builder": "@ionic/angular-toolkit:cordova-build",
+          "options": {
+            "browserTarget": "app:build"
+          },
+          "configurations": {
+            "production": {
+              "browserTarget": "app:build:production"
+            }
           }
         }
       }
@@ -127,6 +193,7 @@
   },
   "cli": {
     "schematicCollections": [
+      "@ionic/angular-toolkit",
       "@ionic/angular-toolkit"
     ],
     "analytics": false
@@ -145,4 +212,4 @@
       "setParserOptionsProject": true
     }
   }
-}
+}

+ 28 - 0
wisdom-app/package-lock.json

@@ -24,6 +24,7 @@
         "@ionic/angular": "^8.0.0",
         "fmode-ng": "^0.0.63",
         "ionicons": "^7.2.1",
+        "ngx-amap": "^3.0.5",
         "rxjs": "~7.8.0",
         "tslib": "^2.3.0",
         "zone.js": "~0.14.2"
@@ -40,6 +41,7 @@
         "@angular/language-service": "^18.0.0",
         "@capacitor/cli": "6.2.0",
         "@ionic/angular-toolkit": "^11.0.1",
+        "@types/amap-js-api": "^1.4.16",
         "@types/jasmine": "~5.1.0",
         "@typescript-eslint/eslint-plugin": "^6.0.0",
         "@typescript-eslint/parser": "^6.0.0",
@@ -5826,6 +5828,13 @@
         "url": "https://github.com/sponsors/isaacs"
       }
     },
+    "node_modules/@types/amap-js-api": {
+      "version": "1.4.16",
+      "resolved": "https://registry.npmmirror.com/@types/amap-js-api/-/amap-js-api-1.4.16.tgz",
+      "integrity": "sha512-gfcEswuU4GNRdGAh74FhxfLlU6qxmVIJYPf3HV0uKucCWQ9iSr8TonDhqBvHVmmQEY60K+UAeIh0YLwKo/jpFQ==",
+      "dev": true,
+      "license": "MIT"
+    },
     "node_modules/@types/body-parser": {
       "version": "1.19.5",
       "resolved": "https://registry.npmmirror.com/@types/body-parser/-/body-parser-1.19.5.tgz",
@@ -14086,6 +14095,25 @@
         "@angular/router": "^18.0.0"
       }
     },
+    "node_modules/ngx-amap": {
+      "version": "3.0.5",
+      "resolved": "https://registry.npmmirror.com/ngx-amap/-/ngx-amap-3.0.5.tgz",
+      "integrity": "sha512-gLoNLVHWcYiXYojNOX7VaR+nlRwA3zCzvOQrjFk9g4athPn5GnyDGVoPyYBmL7o2M1kHORMTrqqMqp+OjdlRwg==",
+      "license": "MIT",
+      "dependencies": {
+        "tslib": "^1.9.0"
+      },
+      "peerDependencies": {
+        "@angular/common": "^6.0.0-rc.0 || >=6.0.0",
+        "@angular/core": "^6.0.0-rc.0 || >=6.0.0"
+      }
+    },
+    "node_modules/ngx-amap/node_modules/tslib": {
+      "version": "1.14.1",
+      "resolved": "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz",
+      "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==",
+      "license": "0BSD"
+    },
     "node_modules/nice-napi": {
       "version": "1.0.2",
       "resolved": "https://registry.npmmirror.com/nice-napi/-/nice-napi-1.0.2.tgz",

+ 3 - 1
wisdom-app/package.json

@@ -29,6 +29,7 @@
     "@ionic/angular": "^8.0.0",
     "fmode-ng": "^0.0.63",
     "ionicons": "^7.2.1",
+    "ngx-amap": "^3.0.5",
     "rxjs": "~7.8.0",
     "tslib": "^2.3.0",
     "zone.js": "~0.14.2"
@@ -45,6 +46,7 @@
     "@angular/language-service": "^18.0.0",
     "@capacitor/cli": "6.2.0",
     "@ionic/angular-toolkit": "^11.0.1",
+    "@types/amap-js-api": "^1.4.16",
     "@types/jasmine": "~5.1.0",
     "@typescript-eslint/eslint-plugin": "^6.0.0",
     "@typescript-eslint/parser": "^6.0.0",
@@ -62,4 +64,4 @@
     "typescript": "~5.4.0"
   },
   "description": "An Ionic project"
-}
+}

+ 82 - 21
wisdom-app/src/app/page/inquiry-human/inquiry-human.component.html

@@ -3,37 +3,98 @@
     <div>
       <ion-button (click)="backhome()" color="primary" slot="start">{{back}}</ion-button>
     </div>
+    <ion-segment [(ngModel)]="selectedSegment" (ionChange)="segmentChanged($event)">
+      <ion-segment-button *ngFor="let segment of segments" [value]="segment">
+        {{segment}}
+      </ion-segment-button>
+    </ion-segment>
   </ion-toolbar>
 </ion-header>
 
 <ion-content>
   <div>
-    <ion-list>
-      <ion-item>
-        <ion-avatar aria-hidden="true" slot="start">
-          <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
+    <ion-card class="ioncard" *ngFor="let doctor of doctors" (click)="goToDoctorDetail(doctor)">
+      <ion-item lines="none">
+        <ion-avatar slot="start">
+          <img [src]="doctor.avatar" alt="医生头像">
         </ion-avatar>
-        <ion-label>Huey</ion-label>
+        
+        <ion-label>
+          <div class="doctor-header">
+            <h2>{{doctor.name}}</h2>
+            <span>{{doctor.title}}</span>
+            <span>{{doctor.department}}</span>
+            <ion-badge color="primary">可开处方</ion-badge>
+          </div>
+          
+          <!-- <div class="doctor-info">
+            <span>{{doctor.title}}</span>
+            <span>{{doctor.department}}</span>
+          </div> -->
+          
+          <div class="hospital-info">
+            <span>{{doctor.hospital}}</span>
+            <ion-badge color="success">{{doctor.hospitalLevel}}</ion-badge>
+            <ion-badge color="warning">{{doctor.hospitalType}}</ion-badge>
+          </div>
+        </ion-label>
       </ion-item>
-      <ion-item>
-        <ion-avatar aria-hidden="true" slot="start">
-          <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
-        </ion-avatar>
-        <ion-label>Dewey</ion-label>
+    
+      <ion-item lines="none">
+        <ion-text color="medium" class="expertise">
+          {{doctor.expertise}}
+        </ion-text>
       </ion-item>
-      <ion-item>
-        <ion-avatar aria-hidden="true" slot="start">
-          <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
-        </ion-avatar>
-        <ion-label>Louie</ion-label>
+    
+      <ion-item lines="none">
+        <div class="stats">
+          <div>
+            <ion-text color="warning">{{doctor.rating}}</ion-text>
+            <ion-icon name="star" color="warning"></ion-icon>
+          </div>
+          <div>接诊量 {{doctor.consultations}}</div>
+          <div>同行认可 {{doctor.recommendations}}</div>
+        </div>
       </ion-item>
-      <ion-item>
-        <ion-avatar aria-hidden="true" slot="start">
-          <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
-        </ion-avatar>
-        <ion-label>Fooie</ion-label>
+    
+      <ion-item lines="none">
+        <div class="consultation-types">
+          <ion-button fill="outline">图文 ¥{{doctor.prices.text}}</ion-button>
+          <ion-button fill="outline">电话 ¥{{doctor.prices.voice}}</ion-button>
+          <ion-button fill="outline">视频 ¥{{doctor.prices.video}}</ion-button>
+          <ion-button color="success">年度好医生</ion-button>
+        </div>
       </ion-item>
-    </ion-list>    
+    </ion-card>
   </div>
+  <!-- <div>
+    <ion-grid>
+      <ion-row>
+        <ion-col size="6" *ngFor="let doctor of doctors1">
+          <ion-card class="ioncard">
+            <ion-item class="ionitem" lines="none">
+              <ion-avatar slot="start">
+                <img [src]="doctor.avatar" />
+              </ion-avatar>
+              <ion-label>
+                <h2>{{doctor.name}}</h2>
+                <p>{{doctor.title}} {{doctor.department}}</p>
+              </ion-label>
+            </ion-item>
+            
+            <ion-item lines="none" class="hospital-infom">
+              <ion-label>
+                <p>{{doctor.hospital}}</p>
+                <div class="badges">
+                  <ion-badge color="success">{{doctor.hospitalLevel}}</ion-badge>
+                  <span>{{doctor.hospitalType}}</span>
+                </div>
+              </ion-label>
+            </ion-item>
+          </ion-card>
+        </ion-col>
+      </ion-row>
+    </ion-grid>
+  </div> -->
 </ion-content>>
 

+ 70 - 0
wisdom-app/src/app/page/inquiry-human/inquiry-human.component.scss

@@ -0,0 +1,70 @@
+.ioncard {
+    margin: 16px;
+    box-shadow: none;
+    border: 1px solid #eee;
+  }
+  
+  .doctor-header {
+    display: flex;
+    align-items: center;
+    gap: 8px;
+    
+    h2 {
+      margin: 0;
+      font-size: 18px;
+      font-weight: bold;
+    }
+  }
+  
+  .doctor-info {
+    margin: 4px 0;
+    font-size: 14px;
+    color: #666;
+    
+    span {
+      margin-right: 8px;
+    }
+  }
+  
+  .hospital-info {
+    display: flex;
+    align-items: center;
+    gap: 8px;
+    font-size: 14px;
+    color: #666;
+  }
+  
+  .expertise {
+    font-size: 14px;
+    display: -webkit-box;
+    // -webkit-line-clamp: 2;
+    -webkit-box-orient: vertical;
+    overflow: hidden;
+  }
+  
+  .stats {
+    display: flex;
+    gap: 16px;
+    font-size: 14px;
+    
+    div {
+      display: flex;
+      align-items: center;
+      gap: 4px;
+    }
+  }
+  
+  .consultation-types {
+    display: flex;
+    gap: 8px;
+    overflow-x: auto;
+    
+    ion-button {
+      --padding-start: 16px;
+      --padding-end: 16px;
+      height: 32px;
+      font-size: 14px;
+    }
+  }
+
+  

+ 110 - 4
wisdom-app/src/app/page/inquiry-human/inquiry-human.component.ts

@@ -1,18 +1,42 @@
 import { Component, OnInit } from '@angular/core';
-import { IonHeader, IonToolbar, IonTitle, IonContent, IonList, IonItem, IonLabel, IonAvatar, IonButton } from '@ionic/angular/standalone';
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonList, IonItem, IonLabel, IonAvatar, IonButton, IonChip, IonIcon, IonBadge, IonText, IonCard, IonSegmentButton, IonSegment, IonCol, IonRow, IonGrid } from '@ionic/angular/standalone';
 import { ExploreContainerComponent } from '../../explore-container/explore-container.component';
 import { addIcons } from 'ionicons';
 import { airplane, bluetooth, call, wifi } from 'ionicons/icons';
 import { Router } from '@angular/router';
+import { CommonModule } from '@angular/common';
+import { FormsModule } from '@angular/forms';
+
 addIcons({ airplane, bluetooth, call, wifi });
+interface Doctor {
+  avatar: string;
+  name: string;
+  title: string;
+  department: string;
+  hospital: string;
+  hospitalLevel: string;
+  hospitalType: string;
+  expertise: string;
+  rating: number;
+  consultations: string;
+  recommendations: number;
+  prices: {
+    text: number;
+    voice: number;
+    video: number;
+  }
+}
+
 
 @Component({
   selector: 'inquiry-human',
   templateUrl: './inquiry-human.component.html',
   styleUrls: ['./inquiry-human.component.scss'],
   standalone: true,
-  imports: [IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent,
-    IonLabel,IonItem,IonList,IonAvatar,IonLabel,IonButton,
+  imports: [
+    IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent,CommonModule,
+    IonLabel,IonItem,IonList,IonAvatar,IonLabel,IonButton,IonChip,IonIcon,IonBadge,
+    IonText,IonCard,IonSegment,IonSegmentButton, FormsModule,IonCol,IonRow,IonGrid
   ]
 })
 export class InquiryHumanComponent  implements OnInit {
@@ -26,5 +50,87 @@ export class InquiryHumanComponent  implements OnInit {
   backhome(){
     this.router.navigate(['/tabs/tab1']);
   }
-
+  selectedSegment = '全部';
+  segments = ['全部', '妇科', '儿科', '皮肤性病科', '内科',];
+  
+  doctors: Doctor[] = [
+    {
+      avatar: 'https://app.fmode.cn/dev/jxnu/202226701019/doctor7.png',
+      name: '张伟',
+      title: '主任医师',
+      department: '消化内科',
+      hospital: '首都医科大学附属北京友谊..',
+      hospitalLevel: '三甲',
+      hospitalType: '百强医院',
+      expertise: '擅长:结肠息肉和息肉病、胃息肉、幽门螺杆菌感染、慢性胃炎、胃食管反流、慢性萎缩性胃炎、糜烂性胃炎...',
+      rating: 5.0,
+      consultations: '1.1万',
+      recommendations: 100,
+      prices: {
+        text: 100,
+        voice: 150,
+        video: 300
+      },
+    },
+    {
+      avatar: 'https://app.fmode.cn/dev/jxnu/202226701019/doctor6.png',
+      name: '张伟',
+      title: '主任医师',
+      department: '消化内科',
+      hospital: '首都医科大学附属北京友谊..',
+      hospitalLevel: '三甲',
+      hospitalType: '百强医院',
+      expertise: '擅长:结肠息肉和息肉病、胃息肉、幽门螺杆菌感染、慢性胃炎、胃食管反流、慢性萎缩性胃炎、糜烂性胃炎...',
+      rating: 5.0,
+      consultations: '1.1万',
+      recommendations: 100,
+      prices: {
+        text: 100,
+        voice: 150,
+        video: 300
+      },
+    },{
+      avatar: 'https://app.fmode.cn/dev/jxnu/202226701019/doctor5.png',
+      name: '张伟',
+      title: '主任医师',
+      department: '消化内科',
+      hospital: '首都医科大学附属北京友谊..',
+      hospitalLevel: '三甲',
+      hospitalType: '百强医院',
+      expertise: '擅长:结肠息肉和息肉病、胃息肉、幽门螺杆菌感染、慢性胃炎、胃食管反流、慢性萎缩性胃炎、糜烂性胃炎...',
+      rating: 5.0,
+      consultations: '1.1万',
+      recommendations: 100,
+      prices: {
+        text: 100,
+        voice: 150,
+        video: 300
+      },
+    },{
+      avatar: 'https://app.fmode.cn/dev/jxnu/202226701019/doctor7.png',
+      name: '张伟',
+      title: '主任医师',
+      department: '消化内科',
+      hospital: '首都医科大学附属北京友谊..',
+      hospitalLevel: '三甲',
+      hospitalType: '百强医院',
+      expertise: '擅长:结肠息肉和息肉病、胃息肉、幽门螺杆菌感染、慢性胃炎、胃食管反流、慢性萎缩性胃炎、糜烂性胃炎...',
+      rating: 5.0,
+      consultations: '1.1万',
+      recommendations: 100,
+      prices: {
+        text: 100,
+        voice: 150,
+        video: 300
+      },
+    }
+    ];
+    goToDoctorDetail(doctor: Doctor) {
+      // this.router.navigate(['/doctor-detail'], { state: { doctor: doctor } });
+    }
+  segmentChanged(event: any) {
+    this.selectedSegment = event.detail.value;
+    console.log(this.selectedSegment);
+  }
+  
 }

+ 2 - 2
wisdom-app/src/app/page/page-create-agent/page-create-agent.component.html

@@ -6,8 +6,8 @@
     <ion-title slot="end">创建智能体</ion-title>
     <!-- <ion-progress-bar type="indeterminate"></ion-progress-bar> -->
      @if(this.progress > 0){
-      // buffer 是缓冲进度,可以理解为最大进度
-      // value 是当前进度
+      <!-- // buffer 是缓冲进度,可以理解为最大进度
+      // value 是当前进度 -->
       <ion-progress-bar [buffer]="buffer" [value]="progress"></ion-progress-bar>
      }
 

+ 45 - 6
wisdom-app/src/app/page/page-inquiry/page-inquiry.component.html

@@ -11,16 +11,47 @@
     <ion-list>
       <ion-item>
         <ion-avatar aria-hidden="true" slot="start">
-          <img alt="" src="https://ionicframework.com/docs/img/demos/avatar.svg" />
+          <img alt="currentUser.get('realname') | 头像" [src]="currentUser.get('avatar')"   />
         </ion-avatar>
-        <ion-label>Huey</ion-label>
+        <ion-label>{{currentUser.get('realname')}}</ion-label>
       </ion-item>
     </ion-list>
   </div>
-  <div class="createai">
-    <ion-button expand="block" (click)="createAI()" color="primary" slot="start">创建ai医生</ion-button>
+  
+  <div>
+      <ion-grid>
+        <ion-row>
+          <ion-col size="6" *ngFor="let doctor of doctorList">
+            <ion-card class="ioncard">
+              <ion-item class="ionitem" lines="none" (click)="openInquiry(doctor)">
+                <ion-avatar slot="start">
+                  <img [src]="doctor.get('avatar')" />
+                </ion-avatar>
+                <ion-label>
+                  <h2>{{ doctor.get('name') }}({{ doctor.get('age') }}岁)</h2>
+                  <p>{{ doctor.get('title') }},{{ doctor.get('depart')?.name }}</p>
+                </ion-label>
+              </ion-item>
+              
+              <ion-item lines="none" class="hospital-infom">
+                <ion-label>
+                  <!-- <p>{{doctor.hospital}}</p> -->
+                  <p>智养互联网医院</p>
+                  <div class="badges">
+                    <!-- <ion-badge color="success">{{doctor.hospitalLevel}}</ion-badge>
+                    <span>{{doctor.hospitalType}}</span> -->
+                    <ion-badge color="success">三甲</ion-badge>
+                    <span>百强医院</span>
+                  </div>
+                </ion-label>
+              </ion-item>
+            </ion-card>
+          </ion-col>
+        </ion-row>
+      </ion-grid>
   </div>
   
+  
   <!-- <h1>科室</h1>
   <ion-input  [value]="keshi" placeholder="请输入科室" (ionInput)="keshiInput($event)"></ion-input> -->
 
@@ -78,7 +109,7 @@
       <h2>{{shareData.diagResult.desc}}</h2>
       <p>{{shareData.diagResult.content}}</p>
     }
-    <div>
+    <!-- <div>
       <ion-card>
         <ion-card-header>
           <ion-card-title>权威医生</ion-card-title>
@@ -99,5 +130,13 @@
           </ion-list>
         </ion-card-content>
       </ion-card>
+    </div> -->
+</ion-content>
+
+<ion-footer>
+  <ion-toolbar>
+    <div class="createai">
+      <ion-button aria-setsize="large" expand="block" (click)="createAI()" color="primary" slot="start">创建ai医生</ion-button>
     </div>
-</ion-content>
+  </ion-toolbar>
+</ion-footer>

+ 48 - 1
wisdom-app/src/app/page/page-inquiry/page-inquiry.component.scss

@@ -2,4 +2,51 @@
     ion-button{
         contain-intrinsic-height: 50px;
     }
-}
+}
+
+.ioncard {
+    margin: 8px;
+    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
+    
+    ion-item {
+      --padding-start: 8px;
+      --padding-end: 8px;
+      --min-height: auto;
+    }
+    
+    ion-avatar {
+      width: 40px;
+      height: 40px;
+    }
+    
+    h2 {
+      font-size: 14px;
+      font-weight: 500;
+      margin-bottom: 4px;
+    }
+    
+    p {
+      font-size: 12px;
+      color: #666;
+      margin: 0;
+    }
+  }
+  
+  .hospital-infom {
+    .badges {
+      display: flex;
+      align-items: center;
+      gap: 4px;
+      margin-top: 4px;
+      
+      ion-badge {
+        font-size: 10px;
+        padding: 2px 4px;
+      }
+      
+      span {
+        font-size: 10px;
+        color: #666;
+      }
+    }
+  }

+ 70 - 9
wisdom-app/src/app/page/page-inquiry/page-inquiry.component.ts

@@ -1,5 +1,5 @@
 import { Component,OnInit } from '@angular/core';
-import { IonHeader, IonToolbar, IonTitle, IonContent, IonButton,IonIcon, ModalController, IonTextarea, IonInput, IonCard, IonCardHeader, IonCardTitle, IonThumbnail, IonCardContent, IonCardSubtitle, IonItem, IonList, IonLabel, IonAvatar } from '@ionic/angular/standalone';
+import { IonHeader, IonToolbar, IonTitle, IonContent, IonButton,IonIcon, ModalController, IonTextarea, IonInput, IonCard, IonCardHeader, IonCardTitle, IonThumbnail, IonCardContent, IonCardSubtitle, IonItem, IonList, IonLabel, IonAvatar, IonCol, IonRow, IonGrid, IonBadge, IonFooter } from '@ionic/angular/standalone';
 import { AgentTaskStep } from 'src/agent/agent.task';
 import { addIcons } from 'ionicons';
 import { radioButtonOffOutline, reloadOutline, checkmarkCircleOutline, closeCircleOutline } from 'ionicons/icons';
@@ -16,8 +16,20 @@ import { TaskInqueryUserAnswer } from 'src/agent/tasks/inquiry/3.inquiry-user-an
 import { Router } from '@angular/router';
 import { CloudObject, CloudQuery, CloudUser } from 'src/lib/ncloud';
 import { openUserLoginModal } from 'src/lib/user/modal-user-login/modal-user-login.component';
+import { FormsModule } from '@angular/forms';
 addIcons({radioButtonOffOutline,reloadOutline,checkmarkCircleOutline,closeCircleOutline})
 
+interface Doctor1 {
+  id: number;
+  name: string;
+  title: string;
+  department: string;
+  hospital: string;
+  hospitalLevel: string;
+  hospitalType: string;
+  avatar: string;
+}
+
 @Component({
   selector: 'page-inquiry',
   templateUrl: './page-inquiry.component.html',
@@ -27,7 +39,7 @@ addIcons({radioButtonOffOutline,reloadOutline,checkmarkCircleOutline,closeCircle
     IonHeader, IonToolbar, IonTitle, IonContent, IonButton,IonTextarea,IonInput,
     IonIcon,AgentUserInputComponent,DecimalPipe,IonCard,IonCardHeader,IonCardTitle,
     IonCardSubtitle,IonCardContent, IonThumbnail, IonItem,IonList,CommonModule,IonLabel,
-    IonAvatar
+    IonAvatar,FormsModule,IonCol,IonRow,IonGrid,IonBadge,IonFooter
   ],
 })
 
@@ -48,11 +60,14 @@ export class PageInquiryComponent  implements OnInit {
     this.doctorList = await query.find()
     console.log(this.doctorList)
   }
-
+  currentUser: CloudUser 
   constructor(
     private modalCtrl:ModalController,
     private router:Router
-  ) {}
+  ) {
+    this.currentUser = new CloudUser;
+    console.log(this.currentUser)
+  }
 
   back:string = "<";
 
@@ -136,11 +151,14 @@ export class PageInquiryComponent  implements OnInit {
       let userPrompt = ``
       if(!currentUser?.id){
         console.log("用户未登录,请登录后重试");
-        let user = await openUserLoginModal(this.modalCtrl);
-        if(!user?.id){
-          return
-        }
-        currentUser = user;
+        this.router.navigate(['/tabs/tab4']);
+        return
+        // let user = await openUserLoginModal(this.modalCtrl);
+        // if(!user?.id){
+        //   this.router.navigate(['/tabs/tab4']);
+        //   return
+        // }
+        // currentUser = user;
       }
       
       if(currentUser?.get("realname")){
@@ -232,4 +250,47 @@ export class PageInquiryComponent  implements OnInit {
       }
       openChatPanelModal(this.modalCtrl,options)
     }
+
+    doctors1: Doctor1[] = [
+      {
+        id: 1,
+        name: '张晨芙',
+        title: '主任医师',
+        department: '小儿重症...',
+        hospital: '浙江大学医学院附属...',
+        hospitalLevel: '三甲',
+        hospitalType: '百强医院',
+        avatar: 'assets/doctor1.jpg'
+      },
+      {
+        id: 2,
+        name: '时若',
+        title: '副主任医师',
+        department: '皮肤科',
+        hospital: '空军军医大学西京医院',
+        hospitalLevel: '三甲',
+        hospitalType: '百强医院',
+        avatar: 'assets/doctor2.jpg'
+      },
+      {
+        id: 3,
+        name: '李洁',
+        title: '主治医师',
+        department: '儿科',
+        hospital: '北京大学人民医院',
+        hospitalLevel: '三甲',
+        hospitalType: '百强医院',
+        avatar: 'assets/doctor3.jpg'
+      },
+      {
+        id: 4,
+        name: '马凤富',
+        title: '主治医师',
+        department: '肛肠科',
+        hospital: '中日友好医院',
+        hospitalLevel: '三甲',
+        hospitalType: '百强医院',
+        avatar: 'assets/doctor4.jpg'
+      }
+    ];
 }

+ 76 - 0
wisdom-app/src/app/tab1/tab1.page.html

@@ -12,6 +12,7 @@
         size="default" 
         (click)="search()">搜索</ion-button>
     </div>
+    
   </ion-toolbar>
 </ion-header>
 <!-- 内存不足 使用以下代码 -->
@@ -114,4 +115,79 @@ node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng serve -->
     </ion-card-content>
   </ion-card>
 </div>
+<div class="clinic-container"  style=" margin:0px 10px;box-shadow: 2px 2px 2px 0px rgba(0, 0, 0, 0.163), -2px -2px 2px 0px rgba(0, 0, 0, 0.148);">
+  <div class="clinic-header">
+    <h2>{{title}}</h2>
+    <p>{{subtitle}}</p>
+  </div>
+  
+  <div class="ads-container">
+    <div class="ad-card" *ngFor="let ad of clinicAds" [style.background-color]="ad.backgroundColor">
+      <div class="ad-content">
+        <div class="text-content">
+          <h3>{{ad.title}}</h3>
+          <p *ngIf="ad.price" class="price">{{ad.price}}</p>
+          <p class="description">{{ad.description}}</p>
+          <ion-button fill="outline" size="small">
+            立即查看
+            <ion-icon name="chevron-forward-outline"></ion-icon>
+          </ion-button>
+        </div>
+        <div class="image-container">
+          <img [src]="ad.image" [alt]="ad.title">
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
+<div class="service-container"  style=" margin:5px 10px;box-shadow: 2px 2px 2px 0px rgba(0, 0, 0, 0.163), -2px -2px 2px 0px rgba(0, 0, 0, 0.148);">
+  <div class="service-header">
+    <div class="title-section">
+      <h2>{{title1}}</h2>
+      <p>{{subtitle1}}</p>
+    </div>
+    <ion-button fill="clear" size="small">
+      查看更多 <ion-icon name="chevron-forward-outline"></ion-icon>
+    </ion-button>
+  </div>
+
+  <div class="service-grid">
+    <!-- 大卡片区域 -->
+    <div class="large-cards">
+      <div class="service-card large" 
+           *ngFor="let service of services | slice:0:2"
+           [style.background-color]="service.backgroundColor">
+        <div class="card-content">
+          <div class="text-content">
+            <h3>{{service.title}}</h3>
+            <p>{{service.description}}</p>
+            <ion-button *ngIf="service.hasDetail" fill="outline" size="small">
+              查看详情
+            </ion-button>
+          </div>
+          <div class="image-container">
+            <img [src]="service.image" [alt]="service.title">
+            <ion-badge *ngIf="service.isHot" color="danger">热门</ion-badge>
+          </div>
+        </div>
+      </div>
+    </div>
+
+    <!-- 小卡片网格 -->
+    <div class="small-cards">
+      <div class="service-card small" 
+           *ngFor="let service of services | slice:2">
+        <div class="card-content">
+          <div class="text-content">
+            <h3>{{service.title}}</h3>
+            <p>{{service.description}}</p>
+          </div>
+          <div class="image-container">
+            <img [src]="service.image" [alt]="service.title">
+          </div>
+        </div>
+      </div>
+    </div>
+  </div>
+</div>
 </ion-content>

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

@@ -219,4 +219,233 @@ ion-thumbnail {
         color: #333;
       }
     }
+  }
+
+
+  // 
+  .clinic-container {
+    padding: 16px;
+    background: #fff;
+  }
+  
+  .clinic-header {
+    margin-bottom: 12px;
+    
+    h2 {
+      font-size: 16px;
+      font-weight: 500;
+      margin: 0 0 4px 0;
+    }
+    
+    p {
+      font-size: 12px;
+      color: #999;
+      margin: 0;
+    }
+  }
+  
+  .ads-container {
+    display: flex;
+    gap: 12px;
+  }
+  
+  .ad-card {
+    flex: 1;
+    border-radius: 8px;
+    padding: 12px;
+    
+    .ad-content {
+      display: flex;
+      justify-content: space-between;
+      align-items: center;
+    }
+    
+    .text-content {
+      h3 {
+        font-size: 14px;
+        font-weight: 500;
+        margin: 0 0 4px 0;
+      }
+      
+      .price {
+        color: #FF6B6B;
+        font-size: 12px;
+        margin: 0 0 4px 0;
+      }
+      
+      .description {
+        color: #666;
+        font-size: 12px;
+        margin: 0 0 8px 0;
+      }
+      
+      ion-button {
+        --padding-start: 8px;
+        --padding-end: 8px;
+        --padding-top: 4px;
+        --padding-bottom: 4px;
+        height: 24px;
+        font-size: 12px;
+        
+        &::part(native) {
+          border-radius: 12px;
+        }
+      }
+    }
+    
+    .image-container {
+      width: 60px;
+      height: 60px;
+      overflow: hidden;
+      border-radius: 30px;
+      
+      img {
+        width: 100%;
+        height: 100%;
+        object-fit: cover;
+      }
+    }
+  }
+
+
+  //
+  .service-container {
+    padding: 16px;
+    background: #fff;
+  }
+  
+  .service-header {
+    display: flex;
+    justify-content: space-between;
+    align-items: flex-start;
+    margin-bottom: 16px;
+  
+    .title-section {
+      h2 {
+        font-size: 16px;
+        font-weight: 500;
+        margin: 0 0 4px 0;
+      }
+  
+      p {
+        font-size: 12px;
+        color: #999;
+        margin: 0;
+      }
+    }
+  
+    ion-button {
+      --color: #999;
+      font-size: 12px;
+    }
+  }
+  
+  .service-grid {
+    display: flex;
+    flex-direction: column;
+    gap: 12px;
+  }
+  
+  .large-cards {
+    display: grid;
+    grid-template-columns: repeat(2, 1fr);
+    gap: 12px;
+  
+    .service-card {
+      border-radius: 12px;
+      padding: 16px;
+      height: 120px;
+  
+      .card-content {
+        display: flex;
+        height: 100%;
+        
+        .text-content {
+          flex: 1;
+          display: flex;
+          flex-direction: column;
+          justify-content: space-between;
+  
+          h3 {
+            font-size: 14px;
+            font-weight: 500;
+            margin: 0 0 4px 0;
+          }
+  
+          p {
+            font-size: 12px;
+            color: #666;
+            margin: 0 0 8px 0;
+          }
+  
+          ion-button {
+            --padding-start: 8px;
+            --padding-end: 8px;
+            height: 24px;
+            font-size: 12px;
+          }
+        }
+  
+        .image-container {
+          position: relative;
+          width: 60px;
+          
+          img {
+            width: 100%;
+            height: auto;
+          }
+  
+          ion-badge {
+            position: absolute;
+            top: 0;
+            right: 0;
+            font-size: 10px;
+          }
+        }
+      }
+    }
+  }
+  
+  .small-cards {
+    display: grid;
+    grid-template-columns: repeat(3, 1fr);
+    gap: 12px;
+  
+    .service-card {
+      background: #f5f5f5;
+      border-radius: 12px;
+      padding: 12px;
+      height: 100px;
+  
+      .card-content {
+        height: 100%;
+        display: flex;
+        flex-direction: column;
+        justify-content: space-between;
+  
+        .text-content {
+          h3 {
+            font-size: 14px;
+            font-weight: 500;
+            margin: 0 0 4px 0;
+          }
+  
+          p {
+            font-size: 12px;
+            color: #666;
+            margin: 0;
+          }
+        }
+  
+        .image-container {
+          text-align: right;
+          
+          img {
+            width: 40px;
+            height: 40px;
+            object-fit: cover;
+          }
+        }
+      }
+    }
   }

+ 131 - 3
wisdom-app/src/app/tab1/tab1.page.ts

@@ -1,5 +1,5 @@
 import { Component } from '@angular/core';
-import { IonCardHeader, IonHeader, IonToolbar, IonTitle, IonContent, IonTabButton, IonSearchbar, IonLabel, IonItem, IonList, NavController, IonCard, IonCardTitle, IonCardSubtitle, IonCardContent, IonThumbnail, IonRippleEffect, IonFab, IonFabList, IonFabButton } from '@ionic/angular/standalone';
+import { IonCardHeader, IonHeader, IonToolbar, IonTitle, IonContent, IonTabButton, IonSearchbar, IonLabel, IonItem, IonList, NavController, IonCard, IonCardTitle, IonCardSubtitle, IonCardContent, IonThumbnail, IonRippleEffect, IonFab, IonFabList, IonFabButton, IonBadge } from '@ionic/angular/standalone';
 import { ExploreContainerComponent } from '../explore-container/explore-container.component';
 import { IonButton } from '@ionic/angular/standalone';
 import { IonIcon } from '@ionic/angular/standalone';
@@ -16,6 +16,28 @@ import { ChatPanelOptions, FmodeChat, FmodeChatMessage, openChatPanelModal } fro
 addIcons({ documentText, chatbubbles, person, calendar, newspaper,
    medkit,clipboard, podium, videocam, people,add
  });
+ import { FmodeMapModule } from 'fmode-ng';
+
+ 
+interface ClinicAd {
+  id: number;
+  title: string;
+  price?: string;
+  description: string;
+  image: string;
+  backgroundColor: string;
+}
+
+interface ServiceItem {
+  id: number;
+  title: string;
+  description: string;
+  image: string;
+  hasDetail?: boolean;
+  isHot?: boolean;
+  backgroundColor?: string;
+  size?: 'large' | 'small';
+}
 @Component({
   selector: 'app-tab1',
   templateUrl: 'tab1.page.html',
@@ -24,11 +46,97 @@ addIcons({ documentText, chatbubbles, person, calendar, newspaper,
   imports: [
     IonHeader, IonToolbar, IonTitle, IonContent, ExploreContainerComponent, IonTabButton, IonButton,
     IonIcon,IonSearchbar,IonLabel,IonItem,IonList,CommonModule,IonCard,IonCardHeader,IonCardTitle,IonCardSubtitle,
-    IonCardContent, IonThumbnail, IonRippleEffect, IonFab, IonFabButton, IonFabList
+    IonCardContent, IonThumbnail, IonRippleEffect, IonFab, IonFabButton, IonFabList,IonBadge
   ],
 })
 export class Tab1Page {
-
+  title1 = "特色服务";
+  subtitle1 = "一站式医疗健康解决方案";
+  
+  services: ServiceItem[] = [
+    {
+      id: 1,
+      title: "援脑妇科病",
+      description: "小症状隐藏大隐患",
+      image: "../../assets/image/doctor7.png",
+      hasDetail: true,
+      backgroundColor: "#E8F5F2",
+      size: 'large'
+    },
+    {
+      id: 2,
+      title: "解决口腔难题",
+      description: "享健康生活",
+      image: "../../assets/image/doctor7.png",
+      hasDetail: true,
+      isHot: true,
+      backgroundColor: "#E8F5F2",
+      size: 'large'
+    },
+    {
+      id: 3,
+      title: "解决皮肤难题",
+      description: "专业医生来助力",
+      image: "../../assets/image/doctor7.png",
+      size: 'small'
+    },
+    {
+      id: 4,
+      title: "儿科常见疾病",
+      description: "在家就能请专家",
+      image: "../../assets/image/doctor7.png",
+      size: 'small'
+    },
+    {
+      id: 5,
+      title: "赶走烦恼困扰",
+      description: "科学治疗好经不费",
+      image: "../../assets/image/doctor7.png",
+      size: 'small'
+    },
+    {
+      id: 6,
+      title: "知己心理",
+      description: "温暖地陪你懂自己",
+      image: "../../assets/image/doctor7.png",
+      size: 'small'
+    },
+    {
+      id: 7,
+      title: "搞定偏头痛",
+      description: "止疼彻底合集",
+      image: "../../assets/image/doctor7.png",
+      size: 'small'
+    },
+    {
+      id: 8,
+      title: "搞定偏头痛",
+      description: "止疼彻底合集",
+      image: "../../assets/image/doctor7.png",
+      size: 'small'
+    }
+  ];
+  title = "专科门诊";
+  subtitle = "智养高复诊率、高口碑名医";
+  
+  clinicAds: ClinicAd[] = [
+    {
+      id: 1,
+      title: "专业男科",
+      price: "18元起",
+      description: "阳痿早泄",
+      image: "../../assets/image/doctor7.png",
+      backgroundColor: "#EEF4FF"
+    },
+    {
+      id: 2,
+      title: "智养中医馆",
+      price: "18元起",
+      description: "口碑中医",
+      image: "../../assets/image/doctor6.png",
+      backgroundColor: "#FFF5EB"
+    }
+  ];
   constructor(
     private router: Router,
     private modalCtrl: ModalController,
@@ -81,6 +189,11 @@ export class Tab1Page {
    */
   goToPage1(){
     console.log(['route'])
+    let user = new CloudUser;
+    if (!user.id){
+      this.router.navigate(['/tabs/tab4'])
+      return
+    }
     this.router.navigate(['/tabs/inquiry/ai'])
   }
 
@@ -88,6 +201,11 @@ export class Tab1Page {
    * Go to the human page
    */
   goToPage2(){
+    let user = new CloudUser;
+    if (!user.id){
+      this.router.navigate(['/tabs/tab4'])
+      return
+    }
     this.router.navigate(['/tabs/inquiry/human'])
   }
 
@@ -122,6 +240,11 @@ export class Tab1Page {
 
   // 导航到指定路由
   navigateTo(route: string) {
+    let user = new CloudUser;
+    if (!user.id){
+      this.router.navigate(['/tabs/tab4'])
+      return
+    }
     this.router.navigate([route]);
     console.log("route: ",route)
   }
@@ -243,10 +366,15 @@ ${userPrompt}
             consult.save();
           }
         }
+
       },
       onChatSaved:(chat:FmodeChat)=>{
         // chat?.chatSession?.id 本次会话的 chatId
         console.log("onChatSaved",chat,chat?.chatSession,chat?.chatSession?.id)
+        // consult.set({
+        //   chatId:chat?.chatSession?.id
+        // })
+        console.log("chat.MessageList", chat?.messageList)
       }
     }
     openChatPanelModal(this.modalCtrl,options)

+ 69 - 0
wisdom-app/src/app/tab2/tab2.page.html

@@ -40,6 +40,7 @@
 
 <ion-content class="knowledge" [fullscreen]="true">
   @if(!searchTerm){
+    
     <div class="content">
       <ion-card>
         <ion-card-header></ion-card-header>
@@ -47,6 +48,23 @@
         <ion-card-content>
           <ion-segment-view>
             <ion-segment-content id="hotdot">
+              <!-- 轮播图区域 -->
+              <div class="carousel-container" style="border-radius: 0px; margin: 0px auto;">
+                <div class="carousel" [style.transform]="'translateX(-' + currentSlide * 100 + '%)'">
+                  <div class="slide" *ngFor="let image of images">
+                    <img [src]="image" alt="轮播图" height="100px" >
+                  </div>
+                </div>
+              
+                <button class="prev" (click)="prevSlide()">&#10094;</button>
+                <button class="next" (click)="nextSlide()">&#10095;</button>
+              
+                <div class="dots">
+                  <span class="dot" *ngFor="let image of images; let i = index" 
+                        [class.active]="i === currentSlide" 
+                        (click)="goToSlide(i)"></span>
+                </div>
+              </div>
               <app-article-card (click)="openDetailModal(card)" *ngFor="let card of cards" [card]="card"></app-article-card>
             </ion-segment-content>
   
@@ -55,6 +73,23 @@
             </ion-segment-content>
   
             <ion-segment-content id="sleep">
+              <!-- 轮播图区域 -->
+              <div class="carousel-container" style="border-radius: 0px; margin: 0px auto;">
+                <div class="carousel" [style.transform]="'translateX(-' + currentSlide * 100 + '%)'">
+                  <div class="slide" *ngFor="let image of images">
+                    <img [src]="image" alt="轮播图" height="100px" >
+                  </div>
+                </div>
+              
+                <button class="prev" (click)="prevSlide()">&#10094;</button>
+                <button class="next" (click)="nextSlide()">&#10095;</button>
+              
+                <div class="dots">
+                  <span class="dot" *ngFor="let image of images; let i = index" 
+                        [class.active]="i === currentSlide" 
+                        (click)="goToSlide(i)"></span>
+                </div>
+              </div>
               <app-article-card (click)="openDetailModal(card)" *ngFor="let card of cards" [card]="card"></app-article-card>
             </ion-segment-content>
   
@@ -62,9 +97,43 @@
               <app-article-card (click)="openDetailModal(card)" *ngFor="let card of cards" [card]="card"></app-article-card>
             </ion-segment-content>
             <ion-segment-content id="male">
+              <!-- 轮播图区域 -->
+              <div class="carousel-container" style="border-radius: 0px; margin: 0px auto;">
+                <div class="carousel" [style.transform]="'translateX(-' + currentSlide * 100 + '%)'">
+                  <div class="slide" *ngFor="let image of images">
+                    <img [src]="image" alt="轮播图" height="100px" >
+                  </div>
+                </div>
+              
+                <button class="prev" (click)="prevSlide()">&#10094;</button>
+                <button class="next" (click)="nextSlide()">&#10095;</button>
+              
+                <div class="dots">
+                  <span class="dot" *ngFor="let image of images; let i = index" 
+                        [class.active]="i === currentSlide" 
+                        (click)="goToSlide(i)"></span>
+                </div>
+              </div>
               <app-article-card (click)="openDetailModal(card)" *ngFor="let card of cards" [card]="card"></app-article-card>
             </ion-segment-content>
             <ion-segment-content id="female">
+              <!-- 轮播图区域 -->
+              <div class="carousel-container" style="border-radius: 0px; margin: 0px auto;">
+                <div class="carousel" [style.transform]="'translateX(-' + currentSlide * 100 + '%)'">
+                  <div class="slide" *ngFor="let image of images">
+                    <img [src]="image" alt="轮播图" height="100px" >
+                  </div>
+                </div>
+              
+                <button class="prev" (click)="prevSlide()">&#10094;</button>
+                <button class="next" (click)="nextSlide()">&#10095;</button>
+              
+                <div class="dots">
+                  <span class="dot" *ngFor="let image of images; let i = index" 
+                        [class.active]="i === currentSlide" 
+                        (click)="goToSlide(i)"></span>
+                </div>
+              </div>
               <app-article-card (click)="openDetailModal(card)" *ngFor="let card of cards" [card]="card"></app-article-card>
             </ion-segment-content>
           </ion-segment-view>

+ 64 - 0
wisdom-app/src/app/tab2/tab2.page.scss

@@ -149,4 +149,68 @@ ion-segment-content {
 //   background-color: rgb(255, 255, 255);
 // }
 
+//
+
+// 轮播图区域
+.carousel-container {
+  position: relative;
+  max-width: 800px;
+  margin: 0 auto;
+  overflow: hidden;
+}
+
+.carousel {
+  display: flex;
+  transition: transform 0.5s ease-in-out;
+}
+
+.slide {
+  min-width: 100%;
+}
+
+.slide img {
+  width: 100%;
+  height: auto;
+}
+
+.prev, .next {
+  position: absolute;
+  top: 50%;
+  transform: translateY(-50%);
+  background: rgba(0, 0, 0, 0.5);
+  color: white;
+  padding: 16px;
+  border: none;
+  cursor: pointer;
+}
+
+.prev {
+  left: 0;
+}
+
+.next {
+  right: 0;
+}
+
+.dots {
+  position: absolute;
+  bottom: 20px;
+  left: 50%;
+  transform: translateX(-50%);
+  text-align: center;
+}
+
+.dot {
+  display: inline-block;
+  width: 10px;
+  height: 10px;
+  margin: 0 5px;
+  background: #bbb;
+  border-radius: 50%;
+  cursor: pointer;
+}
+
+.dot.active {
+  background: #717171;
+} 
 //

+ 42 - 1
wisdom-app/src/app/tab2/tab2.page.ts

@@ -5,7 +5,7 @@ import { addIcons } from 'ionicons';
 import { airplane, bluetooth, call, wifi } from 'ionicons/icons';
 import { ArticleCardComponent } from '../component/article-card/article-card.component';
 import { CommonModule } from '@angular/common';
-import { CloudObject, CloudQuery } from 'src/lib/ncloud';
+import { CloudObject, CloudQuery, CloudUser } from 'src/lib/ncloud';
 import { NavigationLanComponent } from '../component/navigation-lan/navigation-lan.component';
 import { Router } from '@angular/router';
 import {
@@ -33,6 +33,42 @@ addIcons({ chevronDownCircle, chevronForwardCircle, chevronUpCircle, colorPalett
 })
 
 export class Tab2Page {
+  
+ /**
+  * 轮播图
+  */
+ images = [
+  'https://picsum.photos/800/400?random=1',
+  'https://picsum.photos/800/400?random=2',
+  'https://picsum.photos/800/400?random=3',
+  'https://picsum.photos/800/400?random=4',
+  'https://picsum.photos/800/400?random=5',
+  'https://picsum.photos/800/400?random=6',
+];
+
+currentSlide = 0;
+intervalId: any;
+setSlidePosition() {
+  // 这里不需要额外的逻辑,因为在 HTML 中已经通过绑定实现
+}
+
+nextSlide() {
+  this.currentSlide = (this.currentSlide + 1) % this.images.length;
+}
+
+prevSlide() {
+  this.currentSlide = (this.currentSlide - 1 + this.images.length) % this.images.length;
+}
+
+goToSlide(index: number) {
+  this.currentSlide = index;
+}
+
+startAutoSlide() {
+  this.intervalId = setInterval(() => this.nextSlide(), 3000);
+}
+
+
   products: Array<CloudObject> = []; // 当前显示的科普信息
   allCards: Array<CloudObject> = []; // 所有科普信息
 
@@ -57,6 +93,11 @@ export class Tab2Page {
   currentProduct: any;      // 当前选择的科普信息
 
   openDetailModal(product?: any) {
+    let user = new CloudUser;
+    if (!user.id){
+      this.router.navigate(['/tabs/tab4'])
+      return
+    }
     this.isModalOpen = true;
     this.currentProduct = product;
   }

+ 10 - 0
wisdom-app/src/theme/variables.css

@@ -0,0 +1,10 @@
+/**
+ * Ionic Dark Theme
+ * -----------------------------------------------------
+ * For more info, please see:
+ * https://ionicframework.com/docs/theming/dark-mode
+ */
+
+/* @import "@ionic/angular/css/palettes/dark.always.css"; */
+/* @import "@ionic/angular/css/palettes/dark.class.css"; */
+@import "@ionic/angular/css/palettes/dark.system.css";