浏览代码

Merge branch 'master' of http://git.fmode.cn:3000/0225273/APPmy

0225273 4 月之前
父节点
当前提交
d582b9b440
共有 3 个文件被更改,包括 9 次插入3 次删除
  1. 3 0
      src/app/consult/consult.page.html
  2. 1 1
      src/app/tab2/tab2.page.html
  3. 5 2
      src/app/tab2/tab2.page.ts

+ 3 - 0
src/app/consult/consult.page.html

@@ -1,3 +1,6 @@
+<ion-buttons expand="full" fill="clear">
+  <ion-back-button defaultHref="/tabs/tab2"></ion-back-button>
+</ion-buttons>
 <ion-header [translucent]="true">
   <ion-toolbar>
     <ion-title>consult</ion-title>

+ 1 - 1
src/app/tab2/tab2.page.html

@@ -251,7 +251,7 @@
       </ion-card-content>
   
       <!-- 底部 -->
-      <ion-button expand="full" fill="clear">咨询</ion-button>
+      <ion-button expand="full" fill="clear" (click)="openConsultPage()">咨询</ion-button>
       <ion-button expand="full" fill="clear">电话</ion-button>
       <ion-button expand="full" fill="clear">在线预约</ion-button>
       <ion-button expand="full" fill="clear">查看案例</ion-button>

+ 5 - 2
src/app/tab2/tab2.page.ts

@@ -1,6 +1,6 @@
 import { Component } from '@angular/core';
 import { DomSanitizer, SafeHtml } from '@angular/platform-browser';
-
+import { NavController } from '@ionic/angular';
 @Component({
   selector: 'app-tab2',
   templateUrl: 'tab2.page.html',
@@ -359,7 +359,7 @@ export class Tab2Page {
   selectedDesignerSegment: string = 'designer';
   isFollowing: boolean = false;
   
-  constructor(private sanitizer: DomSanitizer) {}
+  constructor(private sanitizer: DomSanitizer,private navCtrl: NavController) {}
   selectedCompany: any;
 
 toggleDetails(company: any) {
@@ -369,6 +369,9 @@ toggleDetails(company: any) {
     this.selectedCompany = company;
   }
 }
+openConsultPage(){
+  this.navCtrl.navigateForward('/consult');
+}
 // 在组件类中实现一个方法来切换关注状态
 toggleFollow() {
   this.isFollowing = !this.isFollowing;