惊鸿戏梦 4 月之前
父節點
當前提交
75a0f7dafd
共有 32 個文件被更改,包括 1463 次插入33 次删除
  1. 53 0
      wisdom-app/src/app/component/time/time.component.html
  2. 58 0
      wisdom-app/src/app/component/time/time.component.scss
  3. 22 0
      wisdom-app/src/app/component/time/time.component.spec.ts
  4. 490 0
      wisdom-app/src/app/component/time/time.component.ts
  5. 20 0
      wisdom-app/src/app/component/weather/weather.component.html
  6. 112 0
      wisdom-app/src/app/component/weather/weather.component.scss
  7. 22 0
      wisdom-app/src/app/component/weather/weather.component.spec.ts
  8. 338 0
      wisdom-app/src/app/component/weather/weather.component.ts
  9. 21 4
      wisdom-app/src/app/page/change-key/change-key.component.ts
  10. 5 2
      wisdom-app/src/app/page/feedback-help/feedback-help.component.html
  11. 72 2
      wisdom-app/src/app/page/feedback-help/feedback-help.component.scss
  12. 31 6
      wisdom-app/src/app/page/feedback-help/feedback-help.component.ts
  13. 28 5
      wisdom-app/src/app/page/page-create-agent/page-create-agent.component.ts
  14. 29 4
      wisdom-app/src/app/page/page-inquiry/page-inquiry.component.ts
  15. 8 0
      wisdom-app/src/app/page/time-weather/time-weather.component.html
  16. 17 0
      wisdom-app/src/app/page/time-weather/time-weather.component.scss
  17. 22 0
      wisdom-app/src/app/page/time-weather/time-weather.component.spec.ts
  18. 24 0
      wisdom-app/src/app/page/time-weather/time-weather.component.ts
  19. 34 2
      wisdom-app/src/app/tab4/tab4.page.html
  20. 12 1
      wisdom-app/src/app/tab4/tab4.page.scss
  21. 38 7
      wisdom-app/src/app/tab4/tab4.page.ts
  22. 7 0
      wisdom-app/src/app/tabs/tabs.routes.ts
  23. 二進制
      wisdom-app/src/assets/durian/duoyun.png
  24. 二進制
      wisdom-app/src/assets/durian/lei.png
  25. 二進制
      wisdom-app/src/assets/durian/qing.png
  26. 二進制
      wisdom-app/src/assets/durian/shachen.png
  27. 二進制
      wisdom-app/src/assets/durian/wu.png
  28. 二進制
      wisdom-app/src/assets/durian/xue.png
  29. 二進制
      wisdom-app/src/assets/durian/yin.png
  30. 二進制
      wisdom-app/src/assets/durian/yu.png
  31. 二進制
      wisdom-app/src/assets/durian/yujiaxue.png
  32. 二進制
      wisdom-app/src/assets/durian/zhenyu.png

+ 53 - 0
wisdom-app/src/app/component/time/time.component.html

@@ -0,0 +1,53 @@
+<!-- <ion-header>
+  <ion-toolbar>
+    <ion-buttons slot="start">
+      <ion-button (click)="preMonth()">上个月</ion-button>
+    </ion-buttons>
+    <ion-title (click)="openPicker()">{{ curYear }}年 {{ curMonth }}月 ></ion-title>
+    <ion-buttons slot="end">
+      <ion-button (click)="nextMonth()">下个月</ion-button>
+    </ion-buttons>
+  </ion-toolbar>
+</ion-header> -->
+<div >
+  <div style="display: flex;margin: auto;justify-content: space-between;">
+    <ion-buttons slot="start">
+      <ion-button (click)="preMonth()">上个月</ion-button>
+    </ion-buttons>
+    <div (click)="openPicker()" style="display: flex;align-items: center;justify-content: center;font-weight: bolder;">{{ curYear }}年 {{ curMonth }}月 ></div>
+    <ion-buttons slot="end">
+      <ion-button (click)="nextMonth()">下个月</ion-button>
+    </ion-buttons>
+  </div>
+    <div>
+      <div class="week-days">
+        <div *ngFor="let day of week" class="week-day">{{ day }}</div>
+      </div>
+    
+      <div class="days">
+        <!-- 上个月 -->
+        <div *ngFor="let item of firstDays" (click)="topre(item)" class="lastday">
+          {{ item }}
+        </div>
+        
+        <!-- 当前月 -->
+        <div *ngFor="let day of curDays" class="curday" 
+          [ngClass]="{'selected': selectedDate === day }" 
+          (click)="selectDate(day)" style="display: flex; flex-direction: column; justify-content: end;">
+          
+          <div class="img" style="height: 60%;">
+            <!-- 根据日期查找天气类型 -->
+            <!-- {{ getWeatherType(curYear, curMonth, day) }} -->
+            <img *ngIf="checkedDates.includes(formatDate(curYear, curMonth, day))" style="height: 100%;" src="" alt="">
+            <img *ngIf="!checkedDates.includes(formatDate(curYear, curMonth, day))" style="height: 100%;" [src]="getWeatherType(curYear, curMonth, day)" alt="">
+          </div>
+          <div style="height: 40%;">{{ day }}</div>
+        </div>
+        
+        <!-- 下个月 -->
+        <div *ngFor="let item of nextDaysArray" (click)="tolast(item)" class="lastday">{{ item }}</div>
+      </div>
+    
+      <!-- <ion-button (click)="daka()">打卡</ion-button> -->
+    </div>
+</div>

+ 58 - 0
wisdom-app/src/app/component/time/time.component.scss

@@ -0,0 +1,58 @@
+.week-days {
+    display: flex;
+    justify-content: space-between;
+    padding: 10px 0;
+  }
+  
+  .week-day {
+    flex: 1;
+    text-align: center;
+    font-weight: bold;
+  }
+  
+  .days {
+    display: flex;
+    flex-wrap: wrap;
+    padding: 10px;
+  }
+  
+  .curday, .lastday {
+    font-size: 12px;
+    width: calc(100% / 7); /* 每行7个 */
+    height: 43px; /* 每个日期的高度 */
+    width: 14.28%;
+    display: flex;
+    flex-direction: column; /* 垂直排列 */
+    align-items: center;
+    justify-content: flex-end; /* 向下对齐 */
+    cursor: pointer;
+    position: relative; /* 使 dot 可以绝对定位 */
+    border-radius: 50%;
+  }
+  
+  .dot {
+    width: 20px; /* 圆点的直径 */
+    height: 20px; /* 圆点的直径 */
+    background-color: blue; /* 圆点的颜色 */
+    border-radius: 50%; /* 圆形 */
+    top: 0; /* 在顶部 */
+    transform: translateY(-50%); /* 向上移动圆点,使其居中 */
+  }
+  
+//   .curday {
+//     // background-color: #f0f0f0; 
+//   }
+  
+  .lastday {
+    // background-color: #e0e0e0; 
+    color: #ccc;
+  }
+  
+  .selected {
+    border: 1px solid blue; /* 选中日期的背景色 */
+    color: rgb(0, 132, 255); /* 选中日期的字体颜色 */
+  }
+  
+  .daka{
+    background-color: #a4e17e;
+  }

+ 22 - 0
wisdom-app/src/app/component/time/time.component.spec.ts

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

+ 490 - 0
wisdom-app/src/app/component/time/time.component.ts

@@ -0,0 +1,490 @@
+import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
+import { IonContent, IonHeader, IonTitle, IonToolbar, IonButton, IonLabel, IonItem, IonList, IonBackButton, IonButtons, IonIcon, IonItemDivider, IonAvatar, IonThumbnail, IonItemOptions, IonItemOption, IonItemSliding, IonInput, IonCheckbox, IonRadio, IonToggle, IonRadioGroup, IonSearchbar, IonSegment, IonSegmentButton, IonDatetime, IonFooter, IonCardContent, IonCardTitle, IonCardHeader, IonCard, IonCol, IonRow, IonGrid, IonChip, IonImg, PickerController, IonPicker } from '@ionic/angular/standalone';
+import { CommonModule } from '@angular/common';
+import { HttpClient } from '@angular/common/http';
+
+import { pinyin } from 'pinyin-pro';
+import { CloudQuery, CloudUser } from 'src/lib/ncloud';
+
+@Component({
+  selector: 'time',
+  templateUrl: './time.component.html',
+  styleUrls: ['./time.component.scss'],
+  standalone: true,
+  imports: [IonContent, IonHeader, IonTitle, IonToolbar, IonButton, IonInput, IonItem, IonList, IonIcon, IonContent, IonHeader, IonTitle, IonToolbar, IonButton, IonLabel, IonLabel, IonList, IonItem, IonBackButton, IonButtons, IonIcon, IonItemDivider, IonAvatar, IonThumbnail, IonItemOptions, IonItemSliding, IonItemOption, IonItemOptions, IonInput, IonCheckbox, IonRadio, IonToggle, IonRadioGroup, IonSearchbar, IonSegment, IonSegmentButton, IonDatetime, IonFooter, IonCardContent, IonCardTitle, IonCardHeader, IonCard, IonCol, IonRow, IonGrid, IonChip, IonImg, CommonModule, IonPicker]
+})
+export class TimeComponent  implements OnInit {
+
+  curYear: number;
+  curMonth: number;
+  week: string[] = ['一', '二', '三', '四', '五', '六', '日'];
+  firstDays: number[] = [];
+  curDays: number[] = [];
+  nextDaysArray: number[] = [];
+  selectedDate: number | null = null;
+
+  pickerColumns: any[] = [];
+  pickerButtons: any[] = [];
+  checkedDates: string[] = [
+
+  ];
+  selectTime: string = ""//选中元素的时间按照“2024-12-20”格式
+
+  async loadDates() {
+    // let currentUser = new CloudUser();
+    // const cloudQuery = new CloudQuery("fitUser");
+    // cloudQuery.equalTo("user", currentUser.toPointer());
+    // const userData = await cloudQuery.find();
+    // console.log("userData::",userData[0].data.checkeddays);
+    // this.checkedDates=userData[0].data.checkeddays
+    
+  }
+
+  @Input() value2: string = ""; // 接收父组件传递的值
+  @Output() ionChange2 = new EventEmitter<string>(); // 输出事件
+  // async fetchWeatherData() {
+  //   try {
+  //     this.weatherData = await this.weatherService.getWeatherData(); // 提取 data 字段
+  //     console.log('天气数据:', this.weatherData); // 打印天气数据
+  //   } catch (error) {
+  //     console.error('获取天气数据失败:', error);
+  //     alert('无法获取天气数据,请检查网络连接或API状态。');
+  //   }
+  // }
+  weather: any = [
+  ];
+  fetchWeatherData() {
+    // 第一个请求,获取 adcode
+    // const apiUrl = '/api/api/weather/city/101240101';
+    // this.http.get(apiUrl)
+    //   .subscribe((response: any) => {
+    //     const adcode = response; // 获取 adcode 字段
+    //     if (adcode) {
+    //       this.weather = adcode.data.forecast
+    //       console.log(this.weather);
+    //       console.log("adcode",adcode);
+          
+
+    //       // 使用 adcode 获取天气信息
+    //     } else {
+    //       console.error('adcode not found in response:', response);
+    //     }
+    //   }, error => {
+    //     console.error('Error fetching adcode:', error);
+    //   });
+
+
+    let a={
+      "message": "success感谢又拍云(upyun.com)提供CDN赞助",
+      "status": 200,
+      "date": "20241225",
+      "time": "2024-12-25 17:35:09",
+      "cityInfo": {
+          "city": "南昌市",
+          "citykey": "101240101",
+          "parent": "江西",
+          "updateTime": "13:32"
+      },
+      "data": {
+          "shidu": "43%",
+          "pm25": 110,
+          "pm10": 137,
+          "quality": "轻度",
+          "wendu": "11.3",
+          "ganmao": "儿童、老年人及心脏、呼吸系统疾病患者人群应减少长时间或高强度户外锻炼",
+          "forecast": [
+              {
+                  "date": "25",
+                  "high": "高温 13℃",
+                  "low": "低温 5℃",
+                  "ymd": "2024-12-25",
+                  "week": "星期三",
+                  "sunrise": "07:07",
+                  "sunset": "17:26",
+                  "aqi": 93,
+                  "fx": "北风",
+                  "fl": "2级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "26",
+                  "high": "高温 12℃",
+                  "low": "低温 6℃",
+                  "ymd": "2024-12-26",
+                  "week": "星期四",
+                  "sunrise": "07:07",
+                  "sunset": "17:26",
+                  "aqi": 75,
+                  "fx": "北风",
+                  "fl": "3级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "27",
+                  "high": "高温 12℃",
+                  "low": "低温 7℃",
+                  "ymd": "2024-12-27",
+                  "week": "星期五",
+                  "sunrise": "07:07",
+                  "sunset": "17:27",
+                  "aqi": 61,
+                  "fx": "北风",
+                  "fl": "3级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "28",
+                  "high": "高温 10℃",
+                  "low": "低温 3℃",
+                  "ymd": "2024-12-28",
+                  "week": "星期六",
+                  "sunrise": "07:08",
+                  "sunset": "17:28",
+                  "aqi": 48,
+                  "fx": "东北风",
+                  "fl": "3级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "29",
+                  "high": "高温 12℃",
+                  "low": "低温 1℃",
+                  "ymd": "2024-12-29",
+                  "week": "星期日",
+                  "sunrise": "07:08",
+                  "sunset": "17:28",
+                  "aqi": 59,
+                  "fx": "东北风",
+                  "fl": "1级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "30",
+                  "high": "高温 13℃",
+                  "low": "低温 7℃",
+                  "ymd": "2024-12-30",
+                  "week": "星期一",
+                  "sunrise": "07:08",
+                  "sunset": "17:29",
+                  "aqi": 65,
+                  "fx": "西北风",
+                  "fl": "1级",
+                  "type": "阴",
+                  "notice": "不要被阴云遮挡住好心情"
+              },
+              {
+                  "date": "31",
+                  "high": "高温 15℃",
+                  "low": "低温 6℃",
+                  "ymd": "2024-12-31",
+                  "week": "星期二",
+                  "sunrise": "07:09",
+                  "sunset": "17:30",
+                  "aqi": 57,
+                  "fx": "东北风",
+                  "fl": "2级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "01",
+                  "high": "高温 13℃",
+                  "low": "低温 7℃",
+                  "ymd": "2025-01-01",
+                  "week": "星期三",
+                  "sunrise": "07:09",
+                  "sunset": "17:30",
+                  "aqi": 50,
+                  "fx": "东北风",
+                  "fl": "2级",
+                  "type": "多云",
+                  "notice": "阴晴之间,谨防紫外线侵扰"
+              },
+              {
+                  "date": "02",
+                  "high": "高温 9℃",
+                  "low": "低温 5℃",
+                  "ymd": "2025-01-02",
+                  "week": "星期四",
+                  "sunrise": "07:09",
+                  "sunset": "17:31",
+                  "aqi": 45,
+                  "fx": "东北风",
+                  "fl": "3级",
+                  "type": "阴",
+                  "notice": "不要被阴云遮挡住好心情"
+              },
+              {
+                  "date": "03",
+                  "high": "高温 11℃",
+                  "low": "低温 4℃",
+                  "ymd": "2025-01-03",
+                  "week": "星期五",
+                  "sunrise": "07:09",
+                  "sunset": "17:32",
+                  "aqi": 43,
+                  "fx": "东北风",
+                  "fl": "3级",
+                  "type": "多云",
+                  "notice": "阴晴之间,谨防紫外线侵扰"
+              },
+              {
+                  "date": "04",
+                  "high": "高温 12℃",
+                  "low": "低温 4℃",
+                  "ymd": "2025-01-04",
+                  "week": "星期六",
+                  "sunrise": "07:10",
+                  "sunset": "17:32",
+                  "aqi": 47,
+                  "fx": "北风",
+                  "fl": "2级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "05",
+                  "high": "高温 14℃",
+                  "low": "低温 6℃",
+                  "ymd": "2025-01-05",
+                  "week": "星期日",
+                  "sunrise": "07:10",
+                  "sunset": "17:33",
+                  "aqi": 56,
+                  "fx": "北风",
+                  "fl": "2级",
+                  "type": "阴",
+                  "notice": "不要被阴云遮挡住好心情"
+              },
+              {
+                  "date": "06",
+                  "high": "高温 12℃",
+                  "low": "低温 7℃",
+                  "ymd": "2025-01-06",
+                  "week": "星期一",
+                  "sunrise": "07:10",
+                  "sunset": "17:34",
+                  "aqi": 43,
+                  "fx": "东北风",
+                  "fl": "3级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "07",
+                  "high": "高温 12℃",
+                  "low": "低温 5℃",
+                  "ymd": "2025-01-07",
+                  "week": "星期二",
+                  "sunrise": "07:10",
+                  "sunset": "17:35",
+                  "aqi": 46,
+                  "fx": "东北风",
+                  "fl": "2级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "08",
+                  "high": "高温 14℃",
+                  "low": "低温 6℃",
+                  "ymd": "2025-01-08",
+                  "week": "星期三",
+                  "sunrise": "07:10",
+                  "sunset": "17:35",
+                  "aqi": 61,
+                  "fx": "北风",
+                  "fl": "1级",
+                  "type": "阴",
+                  "notice": "不要被阴云遮挡住好心情"
+              }
+          ],
+          "yesterday": {
+              "date": "24",
+              "high": "高温 12℃",
+              "low": "低温 3℃",
+              "ymd": "2024-12-24",
+              "week": "星期二",
+              "sunrise": "07:06",
+              "sunset": "17:25",
+              "aqi": 94,
+              "fx": "北风",
+              "fl": "2级",
+              "type": "晴",
+              "notice": "愿你拥有比阳光明媚的心情"
+          }
+      }
+
+  }
+  this.weather = a.data.forecast
+
+
+
+  }
+
+  //转化成拼音
+  convertToPinyin(text: string): string {
+    const result = pinyin(text, {
+      toneType: 'none', // 不带声调
+      type: 'array', // 返回拼音数组
+    });
+    return result.join(''); // 将拼音数组转换为字符串
+  }
+  getWeatherType(year: number, month: number, day: number): string {
+    // 格式化日期为 "YYYY-MM-DD"
+    const dateStr = `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
+
+    // 查找对应的天气数据
+    const weatherData = this.weather.find((item: { ymd: string; }) => item.ymd === dateStr);
+
+    // 如果找到天气数据,返回类型,否则返回空字符串
+    return weatherData ? "assets/durian/" + this.convertToPinyin(weatherData.type) + ".png" : '';
+  }
+
+
+
+  constructor(private pickerCtrl: PickerController, private http: HttpClient) {
+    const today = new Date();
+    this.curYear = today.getFullYear();
+    this.curMonth = today.getMonth() + 1; // 当前月,0-11
+    this.selectedDate = today.getDate(); // 选中当天的日期
+    this.updateCalendar();
+    this.initializePicker();
+    this.loadDates()
+  }
+
+  ngOnInit() {
+    this.fetchWeatherData();
+  }
+  daka() {
+    //打卡,点击之后,被选中的日期元素背景色被标为绿色
+    if (this.checkedDates.includes(this.selectTime)) {
+      console.log("之前就有记录");
+      return
+
+    }
+    this.checkedDates.push(this.selectTime)
+    console.log(this.checkedDates);
+
+  }
+  initializePicker() {
+    this.pickerColumns = [
+      {
+        name: 'year',
+        options: this.createYearOptions(),
+      },
+      {
+        name: 'month',
+        options: this.createMonthOptions(),
+      },
+    ];
+
+    this.pickerButtons = [
+      {
+        text: '取消',
+        role: 'cancel',
+      },
+      {
+        text: '确定',
+        handler: (value: { year: { value: number; }; month: { value: number; }; }) => {
+          this.curYear = value.year.value;
+          this.curMonth = value.month.value;
+          this.updateCalendar();
+        },
+      },
+    ];
+  }
+
+  updateCalendar() {
+    const firstDay = this.getFirstDayOfMonth(this.curYear, this.curMonth);
+    const daysInMonth = this.getDaysInMonth(this.curYear, this.curMonth);
+
+    this.firstDays = this.createArray(firstDay === 0 ? 6 : firstDay - 1);
+    this.curDays = this.createArray(daysInMonth);
+    this.nextDaysArray = this.createArray(7 - this.getLastDayOfMonth(this.curYear, this.curMonth));
+  }
+
+  preMonth() {
+    this.curMonth--;
+    if (this.curMonth < 1) {
+      this.curYear--;
+      this.curMonth = 12;
+    }
+    this.updateCalendar();
+  }
+
+  nextMonth() {
+    this.curMonth++;
+    if (this.curMonth > 12) {
+      this.curYear++;
+      this.curMonth = 1;
+    }
+    this.updateCalendar();
+  }
+  formatDate(year: number, month: number, day: number): string {
+    return `${year}-${month < 10 ? '0' + month : month}-${day < 10 ? '0' + day : day}`;
+  }
+  selectDate(day: number) {
+    this.selectedDate = day; // 选中日期
+    this.selectTime = `${this.curYear}-${this.curMonth < 10 ? '0' + this.curMonth : this.curMonth}-${day < 10 ? '0' + day : day}`; // 格式化时间
+    console.log("组件运作", this.selectTime);
+    this.ionChange2.emit(this.selectTime);
+  }
+
+  tolast(item: number) {
+    this.nextMonth();
+    this.selectedDate = item; // 选中日期
+  }
+
+  topre(item: number) {
+    this.preMonth();
+    this.selectedDate = item; // 选中日期
+  }
+
+  async openPicker() {
+    const picker = await this.pickerCtrl.create({
+      columns: this.pickerColumns,
+      buttons: this.pickerButtons,
+    });
+    await picker.present();
+  }
+
+  createArray(n: number): number[] {
+    return Array.from({ length: n }, (_, index) => index + 1); // 从1开始
+  }
+
+  getDaysInMonth(year: number, month: number): number {
+    return new Date(year, month, 0).getDate();
+  }
+
+  getFirstDayOfMonth(year: number, month: number): number {
+    return new Date(year, month - 1, 1).getDay(); // 注意:月份是0-11
+  }
+
+  getLastDayOfMonth(year: number, month: number): number {
+    return new Date(year, month, 0).getDay(); // 获取当月最后一天是星期几
+  }
+
+  createYearOptions() {
+    const currentYear = new Date().getFullYear();
+    const years = [];
+    for (let i = currentYear - 10; i <= currentYear + 10; i++) {
+      years.push({ text: `${i}`, value: i });
+    }
+    return years;
+  }
+
+  createMonthOptions() {
+    const months = [];
+    for (let i = 1; i <= 12; i++) {
+      months.push({ text: `${i}`, value: i });
+    }
+    return months;
+  }
+}
+

+ 20 - 0
wisdom-app/src/app/component/weather/weather.component.html

@@ -0,0 +1,20 @@
+<div class="box1" style="position: relative;width: 90%;margin: auto;">
+  <div class="box2">
+      <div>
+          <span id="crtp" class="span1" style="display: block;">{{weather?.data?.forecast[0].type}}</span>
+          <span id="interval_tp" style="display: block;" class="span2">{{juti}}</span>
+          <span id="interval_tp" style="display: block;" class="span2">湿度:{{weather?.data?.shidu}}</span>
+          <span id="interval_tp" style="display: block;" class="span2">空气质量:{{weather?.data?.quality}}</span>
+      </div>
+      <span class="span3">
+        <i class="layui-icon layui-icon-location" style="color:#65B0FF">{{weather?.cityInfo?.city}}</i><span id="coordinate"></span>
+      </span>
+  </div>
+  <div class="box3">
+      <span id="crdate" class="span4">{{time}}</span>
+      <div class="box4">
+          <img [src]="image">
+      </div>
+      <span id="weekday" class="span5" style="display: flex;text-align: right;">{{weather?.data?.forecast[0].notice}}</span>
+  </div>
+</div>

+ 112 - 0
wisdom-app/src/app/component/weather/weather.component.scss

@@ -0,0 +1,112 @@
+body {
+    background-color: aqua;
+}
+ 
+img {
+    max-width: 72px;
+    height: auto;
+}
+ 
+* {
+    box-sizing: border-box;
+    border-width: 0;
+    border-style: solid;
+    border-color: #e5e7eb;
+}
+
+.box1 {
+    margin: auto;
+    margin-top: 20px;
+    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
+    display: flex;
+    position: relative;
+    width: 90%;
+    margin-right: 1.5rem;
+    background-color: white;
+    border-radius: 15px;
+    justify-content: space-between;
+    padding: 1.5rem;
+}
+ 
+.box2 {
+    display: flex;
+    flex-direction: column;
+    align-items: flex-start;
+    justify-content: space-between;
+}
+ 
+.box3 {
+    display: flex;
+    flex-direction: column;
+    align-items: flex-end;
+}
+ 
+.box4 {
+    position: relative;
+    width: 72px;
+    margin-bottom: 0.75rem;
+}
+ 
+.span1 {
+    display: block;
+    font-size: 1.875rem;
+    line-height: 2.25rem;
+    margin-bottom: 0.25rem;
+    font-weight: 600;
+}
+ 
+.span2 {
+    --tw-text-opacity: 1;
+    color: rgb(102 102 102 / var(--tw-text-opacity));
+    font-size: 0.875rem;
+    line-height: 1.25rem;
+}
+ 
+.span3 {
+    display: flex;
+    align-items: center;
+}
+ 
+.span4 {
+    --tw-text-opacity: 1;
+    color: rgb(102 102 102 / var(--tw-text-opacity));
+    font-size: 0.875rem;
+    line-height: 1.25rem;
+    margin-bottom: 10px;
+}
+ 
+.span4 {
+    --tw-text-opacity: 1;
+    color: rgb(102 102 102 / var(--tw-text-opacity));
+    font-size: 0.875rem;
+    line-height: 1.25rem;
+}
+
+ion-button {
+    --background: #000;
+    --background-hover: #9ce0be;
+    --background-activated: #88f4be;
+    --background-focused: #88f4be;
+  
+    --color: #ecc422;
+  
+    --border-radius: 15px;
+    --border-color: #000;
+    --border-style: solid;
+    --border-width: 1px;
+  
+    --box-shadow: 0 2px 6px 0 rgb(0, 0, 0, 0.25);
+  
+    --ripple-color: deeppink;
+  
+    --padding-top: 10px;
+    --padding-bottom: 10px;
+  }
+
+
+
+
+
+
+
+

+ 22 - 0
wisdom-app/src/app/component/weather/weather.component.spec.ts

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

+ 338 - 0
wisdom-app/src/app/component/weather/weather.component.ts

@@ -0,0 +1,338 @@
+import { CommonModule } from '@angular/common';
+import { HttpClient } from '@angular/common/http';
+import { Component, OnInit } from '@angular/core';
+import { pinyin } from 'pinyin-pro';
+import { addIcons } from 'ionicons';
+import { checkmark} from 'ionicons/icons';
+addIcons({checkmark})
+
+@Component({
+  selector: 'weather',
+  templateUrl: './weather.component.html',
+  styleUrls: ['./weather.component.scss'],
+  standalone: true,
+  imports:[CommonModule]
+})
+export class WeatherComponent  implements OnInit {
+
+//  
+
+  time: string="";
+  yulu: string="";
+  
+  juti: string="";
+  loading: HTMLIonLoadingElement | null = null; 
+  weather: any = [
+  ];
+
+  async fetchWeatherData() {
+    // 第一个请求,获取 adcode
+    // const apiUrl = '/api/api/weather/city/101240101';
+    // try {
+    //   const response: any = await this.http.get(apiUrl).toPromise(); // 使用 toPromise()
+    //   const adcode = response; // 获取 adcode 字段
+    //   if (adcode) {
+    //     this.weather = adcode; // 赋值给 weather
+    //     console.log(this.weather);
+    //   } else {
+    //     console.error('adcode not found in response:', response);
+    //   }
+    // } catch (error) {
+    //   console.error('Error fetching adcode:', error);
+    // }
+    this.weather={
+      "message": "success感谢又拍云(upyun.com)提供CDN赞助",
+      "status": 200,
+      "date": "20241225",
+      "time": "2024-12-25 17:35:09",
+      "cityInfo": {
+          "city": "南昌市",
+          "citykey": "101240101",
+          "parent": "江西",
+          "updateTime": "13:32"
+      },
+      "data": {
+          "shidu": "43%",
+          "pm25": 110,
+          "pm10": 137,
+          "quality": "轻度",
+          "wendu": "11.3",
+          "ganmao": "儿童、老年人及心脏、呼吸系统疾病患者人群应减少长时间或高强度户外锻炼",
+          "forecast": [
+              {
+                  "date": "25",
+                  "high": "高温 13℃",
+                  "low": "低温 5℃",
+                  "ymd": "2024-12-25",
+                  "week": "星期三",
+                  "sunrise": "07:07",
+                  "sunset": "17:26",
+                  "aqi": 93,
+                  "fx": "北风",
+                  "fl": "2级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "26",
+                  "high": "高温 12℃",
+                  "low": "低温 6℃",
+                  "ymd": "2024-12-26",
+                  "week": "星期四",
+                  "sunrise": "07:07",
+                  "sunset": "17:26",
+                  "aqi": 75,
+                  "fx": "北风",
+                  "fl": "3级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "27",
+                  "high": "高温 12℃",
+                  "low": "低温 7℃",
+                  "ymd": "2024-12-27",
+                  "week": "星期五",
+                  "sunrise": "07:07",
+                  "sunset": "17:27",
+                  "aqi": 61,
+                  "fx": "北风",
+                  "fl": "3级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "28",
+                  "high": "高温 10℃",
+                  "low": "低温 3℃",
+                  "ymd": "2024-12-28",
+                  "week": "星期六",
+                  "sunrise": "07:08",
+                  "sunset": "17:28",
+                  "aqi": 48,
+                  "fx": "东北风",
+                  "fl": "3级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "29",
+                  "high": "高温 12℃",
+                  "low": "低温 1℃",
+                  "ymd": "2024-12-29",
+                  "week": "星期日",
+                  "sunrise": "07:08",
+                  "sunset": "17:28",
+                  "aqi": 59,
+                  "fx": "东北风",
+                  "fl": "1级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "30",
+                  "high": "高温 13℃",
+                  "low": "低温 7℃",
+                  "ymd": "2024-12-30",
+                  "week": "星期一",
+                  "sunrise": "07:08",
+                  "sunset": "17:29",
+                  "aqi": 65,
+                  "fx": "西北风",
+                  "fl": "1级",
+                  "type": "阴",
+                  "notice": "不要被阴云遮挡住好心情"
+              },
+              {
+                  "date": "31",
+                  "high": "高温 15℃",
+                  "low": "低温 6℃",
+                  "ymd": "2024-12-31",
+                  "week": "星期二",
+                  "sunrise": "07:09",
+                  "sunset": "17:30",
+                  "aqi": 57,
+                  "fx": "东北风",
+                  "fl": "2级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "01",
+                  "high": "高温 13℃",
+                  "low": "低温 7℃",
+                  "ymd": "2025-01-01",
+                  "week": "星期三",
+                  "sunrise": "07:09",
+                  "sunset": "17:30",
+                  "aqi": 50,
+                  "fx": "东北风",
+                  "fl": "2级",
+                  "type": "多云",
+                  "notice": "阴晴之间,谨防紫外线侵扰"
+              },
+              {
+                  "date": "02",
+                  "high": "高温 9℃",
+                  "low": "低温 5℃",
+                  "ymd": "2025-01-02",
+                  "week": "星期四",
+                  "sunrise": "07:09",
+                  "sunset": "17:31",
+                  "aqi": 45,
+                  "fx": "东北风",
+                  "fl": "3级",
+                  "type": "阴",
+                  "notice": "不要被阴云遮挡住好心情"
+              },
+              {
+                  "date": "03",
+                  "high": "高温 11℃",
+                  "low": "低温 4℃",
+                  "ymd": "2025-01-03",
+                  "week": "星期五",
+                  "sunrise": "07:09",
+                  "sunset": "17:32",
+                  "aqi": 43,
+                  "fx": "东北风",
+                  "fl": "3级",
+                  "type": "多云",
+                  "notice": "阴晴之间,谨防紫外线侵扰"
+              },
+              {
+                  "date": "04",
+                  "high": "高温 12℃",
+                  "low": "低温 4℃",
+                  "ymd": "2025-01-04",
+                  "week": "星期六",
+                  "sunrise": "07:10",
+                  "sunset": "17:32",
+                  "aqi": 47,
+                  "fx": "北风",
+                  "fl": "2级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "05",
+                  "high": "高温 14℃",
+                  "low": "低温 6℃",
+                  "ymd": "2025-01-05",
+                  "week": "星期日",
+                  "sunrise": "07:10",
+                  "sunset": "17:33",
+                  "aqi": 56,
+                  "fx": "北风",
+                  "fl": "2级",
+                  "type": "阴",
+                  "notice": "不要被阴云遮挡住好心情"
+              },
+              {
+                  "date": "06",
+                  "high": "高温 12℃",
+                  "low": "低温 7℃",
+                  "ymd": "2025-01-06",
+                  "week": "星期一",
+                  "sunrise": "07:10",
+                  "sunset": "17:34",
+                  "aqi": 43,
+                  "fx": "东北风",
+                  "fl": "3级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "07",
+                  "high": "高温 12℃",
+                  "low": "低温 5℃",
+                  "ymd": "2025-01-07",
+                  "week": "星期二",
+                  "sunrise": "07:10",
+                  "sunset": "17:35",
+                  "aqi": 46,
+                  "fx": "东北风",
+                  "fl": "2级",
+                  "type": "晴",
+                  "notice": "愿你拥有比阳光明媚的心情"
+              },
+              {
+                  "date": "08",
+                  "high": "高温 14℃",
+                  "low": "低温 6℃",
+                  "ymd": "2025-01-08",
+                  "week": "星期三",
+                  "sunrise": "07:10",
+                  "sunset": "17:35",
+                  "aqi": 61,
+                  "fx": "北风",
+                  "fl": "1级",
+                  "type": "阴",
+                  "notice": "不要被阴云遮挡住好心情"
+              }
+          ],
+          "yesterday": {
+              "date": "24",
+              "high": "高温 12℃",
+              "low": "低温 3℃",
+              "ymd": "2024-12-24",
+              "week": "星期二",
+              "sunrise": "07:06",
+              "sunset": "17:25",
+              "aqi": 94,
+              "fx": "北风",
+              "fl": "2级",
+              "type": "晴",
+              "notice": "愿你拥有比阳光明媚的心情"
+          }
+      }
+  }
+
+
+  }
+  image:string=""
+  constructor(private http: HttpClient) {
+    this.fetchWeatherData().then(() => {
+      const dateMap = ["周天", "周一", "周二", "周三", "周四", "周五", "周六"];
+      const weekdayMap = ["零", "一", "两", "三", "四", "五"];
+      const date = new Date();
+      this.time = date.getMonth() + 1 + "-" + date.getDate() + " " + dateMap[date.getDay()];
+      if (date.getDay() === 6 || date.getDay() === 0) {
+        this.yulu = "好好享受周末吧~";
+      } else {
+        this.yulu = "再坚持" + weekdayMap[(6 - date.getDay())] + "天就到周末啦~";
+      }
+      console.log("weather.cityInfo:::", this.weather); // 这里打印的 weather 应该不再是空的
+       const weather_log = this.weather.data.forecast[0].type;
+      const daytemp = this.weather.data.forecast[0].high;
+      const nighttemp = this.weather.data.forecast[0].low;
+      
+      console.log("nighttemp",nighttemp);
+      
+      this.juti=nighttemp  + daytemp  
+      console.log(this.juti);
+      this.image="assets/durian/" + this.convertToPinyin(this.weather?.data?.forecast[0].type) + ".png" 
+    });
+  }
+  convertToPinyin(text: string): string {
+    const result = pinyin(text, {
+      toneType: 'none', // 不带声调
+      type: 'array', // 返回拼音数组
+    });
+    return result.join(''); // 将拼音数组转换为字符串
+  }
+  
+  
+  ngOnInit() {
+   
+
+     
+      
+    
+  }
+  public gptre:string = "";
+  public progress = 0;
+  public Complete=false
+  
+
+
+}

+ 21 - 4
wisdom-app/src/app/page/change-key/change-key.component.ts

@@ -9,22 +9,36 @@ import { CloudUser } from 'src/lib/ncloud';
   templateUrl: './change-key.component.html',
   styleUrls: ['./change-key.component.scss'],
   standalone: true,
-  imports: [IonHeader, IonToolbar, IonTitle, IonContent, 
-    IonCard,IonCardContent,IonButton,IonCardHeader,IonCardTitle,IonCardSubtitle,
-    IonInput,IonItem,
-    IonSegment,IonSegmentButton,IonLabel
+  imports: [IonHeader,
+     IonToolbar, 
+     IonTitle, 
+     IonContent, 
+    IonCard,
+    IonCardContent,
+    IonButton,
+    IonCardHeader,
+    IonCardTitle,
+    IonCardSubtitle,
+    IonInput,
+    IonItem,
+    IonSegment,
+    IonSegmentButton,
+    IonLabel
   ],
 })
 export class ChangeKeyComponent  implements OnInit {
 
   currentUser:CloudUser|undefined
   userData:any = {}
+
+  //更新数据
   userDataChange(key:string,ev:any){
     let value = ev?.detail?.value
     if(value){
       this.userData[key] = value
     }
   }
+  
   constructor(
     private router: Router,
     private modalCtrl:ModalController) { 
@@ -34,6 +48,7 @@ export class ChangeKeyComponent  implements OnInit {
 
   ngOnInit() {}
 
+  //保存
   async save(){
   
     this.currentUser?.set(this.userData)
@@ -42,6 +57,8 @@ export class ChangeKeyComponent  implements OnInit {
 
     this.router.navigate(['/tabs/tab4'])
   }
+
+  //取消
   cancel(){
     this.modalCtrl.dismiss(null,"cancel")
     this.router.navigate(['/tabs/tab4'])

+ 5 - 2
wisdom-app/src/app/page/feedback-help/feedback-help.component.html

@@ -1,6 +1,7 @@
 <ion-header>
   <ion-toolbar>
-    <ion-title>反馈与帮助</ion-title>
+    <ion-button slot="start" (click)="backHome()" color="primary">back</ion-button>
+    <ion-title>帮助</ion-title>
   </ion-toolbar>
 </ion-header>
 
@@ -26,4 +27,6 @@
       </ion-content>
     </ng-template>
   </ion-modal>
-</ion-content>
+  <!-- <app-weather></app-weather>
+  <time></time> -->
+</ion-content>

+ 72 - 2
wisdom-app/src/app/page/feedback-help/feedback-help.component.scss

@@ -1,7 +1,77 @@
+// ion-list {
+//   margin: 10px;
+// }
+
+// ion-item {
+//   cursor: pointer;
+// }
+ion-header {
+  background-color: #f8f9fa; /* 设置头部背景颜色 */
+  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
+}
+
+ion-toolbar {
+  --background: transparent; /* 使工具栏背景透明 */
+}
+
+ion-title {
+  font-size: 1.5em; /* 设置标题字体大小 */
+  font-weight: bold; /* 加粗标题 */
+  color: #3880ff; /* 设置标题颜色 */
+}
+
+ion-button {
+  --background: #3880ff; /* 设置按钮背景颜色 */
+  --color: white; /* 设置按钮文字颜色 */
+  font-size: 1em; /* 设置按钮文字大小 */
+  border-radius: 5px; /* 设置按钮圆角 */
+}
+
+ion-button:hover {
+  --background: #3171e0; /* 鼠标悬停时的背景颜色 */
+}
+
+ion-button:active {
+  --background: #2c6bbf; /* 按钮按下时的背景颜色 */
+}
+
+ion-content {
+  padding: 16px; /* 设置内容内边距 */
+}
+
 ion-list {
-  margin: 10px;
+  margin: 0; /* 移除默认的 margin */
 }
 
 ion-item {
-  cursor: pointer;
+  background-color: #ffffff; /* 设置列表项背景颜色 */
+  border-radius: 8px; /* 设置列表项圆角 */
+  margin-bottom: 12px; /* 添加底部间距 */
+  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
+  transition: transform 0.2s; /* 添加过渡效果 */
+}
+
+ion-item:hover {
+  transform: translateY(-2px); /* 鼠标悬停时上移 */
+}
+
+ion-modal {
+  --background: #ffffff; /* 设置模态框背景颜色 */
+}
+
+ion-modal ion-header {
+  background-color: #f8f9fa; /* 设置模态框头部背景颜色 */
+}
+
+ion-modal ion-title {
+  color: #3880ff; /* 设置模态框标题颜色 */
+}
+
+ion-modal ion-button {
+  --background: transparent; /* 设置模态框关闭按钮背景透明 */
+  --color: #3880ff; /* 设置模态框关闭按钮文字颜色 */
+}
+
+ion-modal ion-content {
+  padding: 16px; /* 设置模态框内容内边距 */
 }

+ 31 - 6
wisdom-app/src/app/page/feedback-help/feedback-help.component.ts

@@ -2,13 +2,18 @@ import { Component, OnInit } from '@angular/core';
 import { IonicModule } from '@ionic/angular';
 import { CommonModule } from '@angular/common';
 import { Router } from '@angular/router';
+import { TimeComponent } from 'src/app/component/time/time.component';
+import { WeatherComponent } from 'src/app/component/weather/weather.component';
 
 @Component({
   selector: 'feedback-help',
   templateUrl: './feedback-help.component.html',
   styleUrls: ['./feedback-help.component.scss'],
-  imports:[IonicModule,
-    CommonModule
+  imports:[
+    IonicModule,
+    CommonModule,
+    TimeComponent,
+    WeatherComponent,
   ],
   standalone: true,
 })
@@ -23,15 +28,35 @@ export class FeedbackHelpComponent  implements OnInit {
   isModalOpen = false;
   selectedQuestion: any = null;
 
+
+  //问题及解决
   questions = [
-    { title: '如何重置密码?', detail: '您可以通过点击“忘记密码”链接来重置您的密码。' },
-    { title: '如何联系客服?', detail: '您可以通过应用内的“联系客服”功能与我们的客服团队联系。' },
-    { title: '如何更新个人信息?', detail: '点击我的信息或者头像,您可以编辑和更新您的个人信息。' },
-    { title: '如何查看订单历史?', detail: '在“我的订单”页面,您可以查看所有的订单历史记录。' },
+    { title: '如何修改密码?', 
+      detail: '您可以通过点击我的主页“修改密码”链接来重置您的密码。' },
+    { title: '如何联系客服?', 
+      detail: '您可以通过应用内的“联系客服”功能与我们的ai客服团队联系。' },
+    { title: '如何更新个人信息?', 
+      detail: '点击我的信息或者头像,您可以编辑和更新您的个人信息。' },
+    { title: '如何查看进行问诊?', 
+      detail: '您可以通过首页ai医生进去选择与您病症相关科室的医生点击进行问诊' },
+    { title: '如果我对 AI 的诊断结果有疑问怎么办?', 
+      detail: '用户可以将自己的疑问和 AI 诊断结果反馈给客服人员,客服人员会初步判断情况' },
+    { title: '我的问诊信息会被泄露吗?', 
+      detail: '确保用户信息仅用于医疗诊断目的,我方承诺不会将其泄露给第三方机构或个人。' },
+    { title: '我不知道如何准确描述自己的症状,怎么办?', 
+      detail: '您只需跟ai医生描述您不舒服的地方,医生会对此进行深入提问,您问答医生提出的问题就行了。' },
+    { title: '如何修改密码?', 
+      detail: '您可以通过点击我的主页“修改密码”链接来重置您的密码。' },
   ];
 
+  //打开解决方案
   openDetail(question: any) {
     this.selectedQuestion = question;
     this.isModalOpen = true;
   }
+
+  //返回我的主页
+  backHome(){
+    this.router.navigate(['/tabs/tab4'])
+  }
 }

+ 28 - 5
wisdom-app/src/app/page/page-create-agent/page-create-agent.component.ts

@@ -12,11 +12,34 @@ import { AvatarModule, ChatPanelOptions, DalleOptions, FmodeChat, FmodeChatCompl
   styleUrls: ['./page-create-agent.component.scss'],
   standalone: true,
   imports: [
-    IonHeader, IonToolbar, IonTitle, IonContent, IonButton,IonTextarea,IonInput,
-    IonIcon,IonCard,IonCardHeader,IonCardTitle,
-    IonCardSubtitle,IonCardContent, IonThumbnail, IonItem,IonList,CommonModule,IonLabel,
-    IonAvatar, IonSelect, IonSelectOption,IonButtons,IonProgressBar,
-    IonText, IonCardHeader, IonCardSubtitle,IonRefresher,IonRefresherContent,
+    IonHeader, 
+    IonToolbar, 
+    IonTitle, 
+    IonContent,
+     IonButton,
+     IonTextarea,
+     IonInput,
+    IonIcon,
+    IonCard,
+    IonCardHeader,
+    IonCardTitle,
+    IonCardSubtitle,
+    IonCardContent, 
+    IonThumbnail, 
+    IonItem,
+    IonList,
+    CommonModule,
+    IonLabel,
+    IonAvatar, 
+    IonSelect, 
+    IonSelectOption,
+    IonButtons,
+    IonProgressBar,
+    IonText, 
+    IonCardHeader,
+     IonCardSubtitle,
+     IonRefresher,
+     IonRefresherContent,
     IonToast
   ],
 })

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

@@ -36,10 +36,35 @@ interface Doctor1 {
   styleUrls: ['./page-inquiry.component.scss'],
   standalone: true,
   imports: [
-    IonHeader, IonToolbar, IonTitle, IonContent, IonButton,IonTextarea,IonInput,
-    IonIcon,AgentUserInputComponent,DecimalPipe,IonCard,IonCardHeader,IonCardTitle,
-    IonCardSubtitle,IonCardContent, IonThumbnail, IonItem,IonList,CommonModule,IonLabel,
-    IonAvatar,FormsModule,IonCol,IonRow,IonGrid,IonBadge,IonFooter,IonSegment,IonSegmentButton,
+    IonHeader, 
+    IonToolbar,
+     IonTitle, 
+     IonContent, 
+     IonButton,
+     IonTextarea,
+     IonInput,
+    IonIcon,
+    AgentUserInputComponent,
+    DecimalPipe,
+    IonCard,
+    IonCardHeader,
+    IonCardTitle,
+    IonCardSubtitle,
+    IonCardContent, 
+    IonThumbnail, 
+    IonItem,
+    IonList,
+    CommonModule,
+    IonLabel,
+    IonAvatar,
+    FormsModule,
+    IonCol,
+    IonRow,
+    IonGrid,
+    IonBadge,
+    IonFooter,
+    IonSegment,
+    IonSegmentButton,
   ],
 })
 

+ 8 - 0
wisdom-app/src/app/page/time-weather/time-weather.component.html

@@ -0,0 +1,8 @@
+<div class="divback">
+
+  <ion-card>
+    <weather></weather>
+    <time></time>
+  </ion-card>
+
+</div>

+ 17 - 0
wisdom-app/src/app/page/time-weather/time-weather.component.scss

@@ -0,0 +1,17 @@
+.divback{
+    width: 100%;
+    height: 100%;
+    background-image: url('https://app.fmode.cn/dev/jxnu/202226701019/zhuti2.jpg');
+    background-size: cover;
+    background-position: center;
+    display: flex;
+    justify-content: center;
+    align-items: center;
+}
+ion-card {
+    opacity: 0.9;
+    margin: 0 auto; /* 使卡片居中 */
+    max-width: 400px; /* 设置卡片的最大宽度 */
+    border-radius: 10px; /* 设置卡片的圆角 */
+    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* 添加阴影效果 */
+  }

+ 22 - 0
wisdom-app/src/app/page/time-weather/time-weather.component.spec.ts

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

+ 24 - 0
wisdom-app/src/app/page/time-weather/time-weather.component.ts

@@ -0,0 +1,24 @@
+import { Component, OnInit } from '@angular/core';
+import { IonCard, IonContent } from '@ionic/angular/standalone';
+import { TimeComponent } from 'src/app/component/time/time.component';
+import { WeatherComponent } from 'src/app/component/weather/weather.component';
+
+@Component({
+  selector: 'time-weather',
+  templateUrl: './time-weather.component.html',
+  styleUrls: ['./time-weather.component.scss'],
+  standalone: true,
+  imports:[
+    TimeComponent,
+    WeatherComponent,
+    IonContent,
+    IonCard
+  ]
+})
+export class TimeWeatherComponent  implements OnInit {
+
+  constructor() { }
+
+  ngOnInit() {}
+
+}

+ 34 - 2
wisdom-app/src/app/tab4/tab4.page.html

@@ -48,6 +48,7 @@
       
     }
     @if(pageNum==1){
+      
       <ion-card >
           <ion-card-header class="card-header">
             <img [src]="currentUser?.get('avatar')" onerror="this.src='https://app.fmode.cn/dev/jxnu/202226701019/头像示例.png';" alt="图片加载失败" class="avatar" />
@@ -77,6 +78,36 @@
         </ion-card-content>
       </ion-card>
 
+      <ion-card >
+        <ion-card-header>
+          <ion-card-title>修改密码</ion-card-title>
+          <ion-card-subtitle>点击前往修改密码</ion-card-subtitle>
+        </ion-card-header>
+        <ion-card-content>
+          <ion-button expand="block" (click)="goToKey()" color="success">前往修改</ion-button>
+        </ion-card-content>
+      </ion-card>
+
+      <ion-card >
+        <ion-card-header>
+          <ion-card-title>天气与时间</ion-card-title>
+          <ion-card-subtitle>点击前往查看今日天气与日历</ion-card-subtitle>
+        </ion-card-header>
+        <ion-card-content>
+          <ion-button expand="block" (click)="goToWeatherTime()" color="success">前往</ion-button>
+        </ion-card-content>
+      </ion-card>
+
+      <ion-card >
+        <ion-card-header>
+          <ion-card-title>帮助</ion-card-title>
+          <ion-card-subtitle>点击前往查看相关问题的解决</ion-card-subtitle>
+        </ion-card-header>
+        <ion-card-content>
+          <ion-button expand="block" (click)="goToHelp()" color="success">前往</ion-button>
+        </ion-card-content>
+      </ion-card>
+
       <ion-card class="memo-card" >
         <h2 class="memo-title">健康备忘录</h2>
         <p class="memo-description">写下您问诊的医生名或者心动的科普知识,便于您下次查找</p>
@@ -88,6 +119,7 @@
             }
         </ul>
       </ion-card>
+     
     }
     @if(pageNum==2){
       <ion-content class="ye2">
@@ -121,8 +153,8 @@
             <ion-label (click)="goToKey()">修改密码</ion-label>
           </ion-item>
           <ion-item>
-            <ion-icon name="bag" slot="start"></ion-icon>
-            <ion-label>我的套餐包</ion-label>
+            <ion-icon name="cloud-circle" slot="start"></ion-icon>
+            <ion-label (click)="goToWeatherTime()">天气与时间</ion-label>
           </ion-item>
           <ion-item>
             <ion-icon name="chatbox" slot="start"></ion-icon>

+ 12 - 1
wisdom-app/src/app/tab4/tab4.page.scss

@@ -193,4 +193,15 @@ ion-card:hover {
   .zi2{
     font-size: smaller;
     color: #e0f7fa;
-  }
+  }
+
+//   .divback{
+//     width: 100%;
+//     height: 100%;
+//     background-image: url('https://app.fmode.cn/dev/jxnu/202226701019/logo.jpg');
+//     background-size: cover;
+//     background-position: center;
+//     // display: flex;
+//     // justify-content: center;
+//     // align-items: center;
+// }

+ 38 - 7
wisdom-app/src/app/tab4/tab4.page.ts

@@ -11,12 +11,28 @@ import { Router } from '@angular/router';
   templateUrl: 'tab4.page.html',
   styleUrls: ['tab4.page.scss'],
   standalone: true,
-  imports: [IonHeader, IonToolbar, IonTitle, IonContent, IonLabel,IonItem,IonIcon,IonList,IonAvatar,
-    IonCard,IonCardContent,IonButton,IonCardHeader,IonCardTitle,IonCardSubtitle,
-    EditTagComponent,IonRefresher,IonRefresherContent
+  imports: [IonHeader, 
+    IonToolbar, 
+    IonTitle,
+     IonContent, 
+     IonLabel,
+     IonItem,
+     IonIcon,
+     IonList,
+     IonAvatar,
+    IonCard,
+    IonCardContent,
+    IonButton,
+    IonCardHeader,
+    IonCardTitle,
+    IonCardSubtitle,
+    EditTagComponent,
+    IonRefresher,
+    IonRefresherContent
   ],
 })
 export class Tab4Page {
+  //主题页面切换
   pageNum:Number=0
   changeNum1(){
     this.pageNum=1;
@@ -25,6 +41,7 @@ export class Tab4Page {
     this.pageNum=2;
   }
 
+  //页面刷新
   handleRefresh(event:any) {
     setTimeout(() => {
       // Any calls to load data go here
@@ -33,28 +50,39 @@ export class Tab4Page {
     }, 2000);
   }
 
-  goToCollection(){
-    console.log("goToCollection");
-  }
+  // goToCollection(){
+  //   console.log("goToCollection");
+  // }
 
+  //前往头像生成页面
   goToAvatar(){
     console.log(['route'])
     this.router.navigate(['/tabs/picture'])
   }
 
+  //前往健康信息显示页面
   goToHealth(){
     this.router.navigate(['/tabs/my-health'])
   }
 
+  //前往帮助页面
   goToHelp(){
     
     this.router.navigate(['/tabs/help'])
   }
+
+  //前往密码修改页面
   goToKey(){
     
     this.router.navigate(['/tabs/password'])
   }
 
+  //前往天气时间页面
+  goToWeatherTime(){
+    this.router.navigate(['/tabs/weather-time'])
+  }
+
+  //用户
   currentUser:CloudUser|undefined
   constructor(
     private router: Router,
@@ -75,11 +103,14 @@ export class Tab4Page {
       this.currentUser = user
     }
   }
+
+  //登出
   logout(){
-    // this.pageNum=0;
     this.currentUser?.logout();
+    this.pageNum=0;
   }
 
+  //用户信息编辑
   editUser(){
     openUserEditModal(this.modalCtrl)
   }

+ 7 - 0
wisdom-app/src/app/tabs/tabs.routes.ts

@@ -95,6 +95,13 @@ export const routes: Routes = [
             (m) => m.ChangeKeyComponent
           ),
       },
+      {
+        path: 'weather-time',
+        loadComponent: () =>
+          import('../page/time-weather/time-weather.component').then(
+            (m) => m.TimeWeatherComponent
+          ),
+      },
       {
         path: '',
         redirectTo: '/tabs/tab4',

二進制
wisdom-app/src/assets/durian/duoyun.png


二進制
wisdom-app/src/assets/durian/lei.png


二進制
wisdom-app/src/assets/durian/qing.png


二進制
wisdom-app/src/assets/durian/shachen.png


二進制
wisdom-app/src/assets/durian/wu.png


二進制
wisdom-app/src/assets/durian/xue.png


二進制
wisdom-app/src/assets/durian/yin.png


二進制
wisdom-app/src/assets/durian/yu.png


二進制
wisdom-app/src/assets/durian/yujiaxue.png


二進制
wisdom-app/src/assets/durian/zhenyu.png