|
@@ -6,6 +6,7 @@ import { airplane, bluetooth, call, wifi, star, checkmarkCircle } from 'ionicons
|
|
import { Router } from '@angular/router';
|
|
import { Router } from '@angular/router';
|
|
import { CommonModule } from '@angular/common';
|
|
import { CommonModule } from '@angular/common';
|
|
import { FormsModule } from '@angular/forms';
|
|
import { FormsModule } from '@angular/forms';
|
|
|
|
+import { CloudObject, CloudUser } from 'src/lib/ncloud';
|
|
|
|
|
|
addIcons({ airplane, bluetooth, call, wifi });
|
|
addIcons({ airplane, bluetooth, call, wifi });
|
|
|
|
|
|
@@ -107,12 +108,14 @@ export class InquiryHumanComponent implements OnInit {
|
|
isModalOpen = false;
|
|
isModalOpen = false;
|
|
isPaymentModalOpen = false; // 新增状态变量
|
|
isPaymentModalOpen = false; // 新增状态变量
|
|
doctor: any;
|
|
doctor: any;
|
|
-
|
|
|
|
|
|
+ currentUser: CloudUser
|
|
constructor(
|
|
constructor(
|
|
private router: Router,
|
|
private router: Router,
|
|
private toastController: ToastController // 注入 ToastController
|
|
private toastController: ToastController // 注入 ToastController
|
|
) {
|
|
) {
|
|
- addIcons({star,checkmarkCircle}); }
|
|
|
|
|
|
+ addIcons({star,checkmarkCircle});
|
|
|
|
+ this.currentUser = new CloudUser();
|
|
|
|
+ }
|
|
|
|
|
|
ngOnInit() { }
|
|
ngOnInit() { }
|
|
|
|
|
|
@@ -121,14 +124,14 @@ export class InquiryHumanComponent implements OnInit {
|
|
this.router.navigate(['/tabs/tab1']);
|
|
this.router.navigate(['/tabs/tab1']);
|
|
}
|
|
}
|
|
selectedSegment = '全部';
|
|
selectedSegment = '全部';
|
|
- segments = ['全部', '妇科', '儿科', '皮肤性病科', '内科',];
|
|
|
|
-
|
|
|
|
|
|
+ segments = ['全部', '妇科', '儿科', '皮肤性病科', '内科'];
|
|
|
|
+
|
|
doctors: Doctor[] = [
|
|
doctors: Doctor[] = [
|
|
{
|
|
{
|
|
avatar: 'https://app.fmode.cn/dev/jxnu/202226701019/doctor7.png',
|
|
avatar: 'https://app.fmode.cn/dev/jxnu/202226701019/doctor7.png',
|
|
name: '张伟',
|
|
name: '张伟',
|
|
title: '主任医师',
|
|
title: '主任医师',
|
|
- department: '妇科',
|
|
|
|
|
|
+ department: '消化内科',
|
|
hospital: '首都医科大学附属北京友谊..',
|
|
hospital: '首都医科大学附属北京友谊..',
|
|
hospitalLevel: '三甲',
|
|
hospitalLevel: '三甲',
|
|
hospitalType: '百强医院',
|
|
hospitalType: '百强医院',
|
|
@@ -145,71 +148,22 @@ export class InquiryHumanComponent implements OnInit {
|
|
isVerified: true,
|
|
isVerified: true,
|
|
isExpert: true,
|
|
isExpert: true,
|
|
},
|
|
},
|
|
- {
|
|
|
|
- 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
|
|
|
|
- },
|
|
|
|
- tags: ['百强医院', '可开处方', '从业24年', '擅长消化系统疾病', '可开处方'],
|
|
|
|
- isVerified: true,
|
|
|
|
- isExpert: true,
|
|
|
|
- },{
|
|
|
|
- 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
|
|
|
|
- },
|
|
|
|
- tags: ['百强医院', '可开处方', '从业24年', '擅长消化系统疾病', '可开处方'],
|
|
|
|
- isVerified: true,
|
|
|
|
- isExpert: true,
|
|
|
|
- },{
|
|
|
|
- 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
|
|
|
|
- },
|
|
|
|
- tags: ['百强医院', '可开处方', '从业24年', '擅长消化系统疾病', '可开处方'],
|
|
|
|
- isVerified: true,
|
|
|
|
- isExpert: true,
|
|
|
|
- }
|
|
|
|
- ];
|
|
|
|
- goToDoctorDetail(doctor: Doctor) {
|
|
|
|
- // this.router.navigate(['/doctor-detail'], { state: { doctor: doctor } });
|
|
|
|
- }
|
|
|
|
|
|
+ // ... 其他医生数据 ...
|
|
|
|
+ ];
|
|
|
|
+
|
|
|
|
+ openDetailModal(doctor?: any) {
|
|
|
|
+ this.isModalOpen = true;
|
|
|
|
+ this.doctor = doctor;
|
|
|
|
+ }
|
|
|
|
+ closeDetailModal() {
|
|
|
|
+ this.isModalOpen = false;
|
|
|
|
+ this.doctor = null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ goToDoctorDetail(doctor: Doctor) {
|
|
|
|
+ // this.router.navigate(['/doctor-detail'], { state: { doctor: doctor } });
|
|
|
|
+ }
|
|
|
|
+
|
|
segmentChanged(event: any) {
|
|
segmentChanged(event: any) {
|
|
this.selectedSegment = event.detail.value;
|
|
this.selectedSegment = event.detail.value;
|
|
console.log(this.selectedSegment);
|
|
console.log(this.selectedSegment);
|
|
@@ -238,4 +192,21 @@ export class InquiryHumanComponent implements OnInit {
|
|
closePaymentModal() {
|
|
closePaymentModal() {
|
|
this.isPaymentModalOpen = false;
|
|
this.isPaymentModalOpen = false;
|
|
}
|
|
}
|
|
|
|
+ appoint(id:any){
|
|
|
|
+ let appointment = new CloudObject('appointment')
|
|
|
|
+ appointment.set({
|
|
|
|
+ doctor: {
|
|
|
|
+ __type:"Pointer",
|
|
|
|
+ className:"doctor",
|
|
|
|
+ objectId:id
|
|
|
|
+ },
|
|
|
|
+ user: {
|
|
|
|
+ __type:"Pointer",
|
|
|
|
+ className:"user",
|
|
|
|
+ objectId:this.currentUser.id
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ }
|
|
}
|
|
}
|