diff --git a/patient/pages/expertConsult/expertConsult.js b/patient/pages/expertConsult/expertConsult.js index 9863435..aa8c748 100644 --- a/patient/pages/expertConsult/expertConsult.js +++ b/patient/pages/expertConsult/expertConsult.js @@ -25,7 +25,7 @@ Page({ inquiry_type:'1,3', inquiry_mode:'1,2', navName:"专家问诊", - scrollHeight:300, + scrollHeight:150, sickList:[], img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static', option: [ @@ -73,10 +73,10 @@ Page({ .boundingClientRect((res) => { // console.log(event.detail.scrollTop) let H=0; - if(event.detail.scrollTop>350){ + if(event.detail.scrollTop>=175){ H=0; }else{ - H=300 + H=150 } this.setData({ //scrollTop: event.detail.scrollTop, diff --git a/patient/pages/expertConsult/expertConsult.wxml b/patient/pages/expertConsult/expertConsult.wxml index c43942b..dcef1a9 100644 --- a/patient/pages/expertConsult/expertConsult.wxml +++ b/patient/pages/expertConsult/expertConsult.wxml @@ -4,7 +4,7 @@ - + diff --git a/patient/pages/expertDetail/expertDetail.js b/patient/pages/expertDetail/expertDetail.js index 8d8ac3a..d84bd46 100644 --- a/patient/pages/expertDetail/expertDetail.js +++ b/patient/pages/expertDetail/expertDetail.js @@ -72,8 +72,9 @@ Page({ cycle:'', rounds:'' }, - getHeight(){ - wx.createSelectorQuery().select('#swiperitem3').boundingClientRect( (rect)=>{ + getHeight(id){ + console.log("id:"+id); + wx.createSelectorQuery().select('#swiperitem'+id).boundingClientRect( (rect)=>{ this.setData({ tab3Height:(rect.height) }) @@ -133,12 +134,15 @@ bindchange(e){ currentData:Number(id) }) if(id==0){ + this.getHeight(1) this.setData({ inquiry_type:this.data.current_inquiry_config.inquiry_type, inquiry_mode:this.data.current_inquiry_config.inquiry_mode }) + }else if(id==1){ - let {hasVideoList,canVideo}=this.data; + this.getHeight(2); + let {hasVideoList,canVideo}=this.data; this.setData({ inquiry_type:1, inquiry_mode:2 @@ -146,12 +150,15 @@ bindchange(e){ if(hasVideoList && !canVideo){ this.goVideo(); } + }else { + this.getHeight(3) this.setData({ inquiry_type:1, inquiry_mode:6 }) } + }, confirm(event) { let {id}=this.data; @@ -470,9 +477,7 @@ bindchange(e){ break; } } - setTimeout(()=>{ - this.getHeight() - },800) + if(this.data.canTuwen){ this.setData({ @@ -480,6 +485,7 @@ bindchange(e){ inquiry_type:this.data.current_inquiry_config.inquiry_type, inquiry_mode:this.data.current_inquiry_config.inquiry_mode }) + this.getHeight(1) }else{ if(this.data.canVideo){ let {hasVideoList,canVideo}=this.data; @@ -491,7 +497,7 @@ bindchange(e){ if(hasVideoList && !canVideo){ this.goVideo(); } - + this.getHeight(2) }else{ if(this.data.canDiffcult){ this.setData({ @@ -499,6 +505,9 @@ bindchange(e){ inquiry_type:1, inquiry_mode:6 }) + this.getHeight(3) + }else{ + this.getHeight(1) } } } @@ -519,11 +528,12 @@ bindchange(e){ this.setData({ doctor_id:doctor_id }) + this.getDeatil(doctor_id); this.getService(doctor_id); this.getEvaluationList(); this.getVideoDoctorList(); - + }, /** diff --git a/patient/pages/expertDetail/expertDetail.wxml b/patient/pages/expertDetail/expertDetail.wxml index becd26b..1b0b8eb 100644 --- a/patient/pages/expertDetail/expertDetail.wxml +++ b/patient/pages/expertDetail/expertDetail.wxml @@ -134,10 +134,10 @@ - + - + @@ -164,7 +164,7 @@ - +