3.26上传更改tab

This commit is contained in:
zoujiandong 2024-03-26 10:33:32 +08:00
parent 4ae2b50539
commit 1ba1db521f
4 changed files with 25 additions and 15 deletions

View File

@ -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,

View File

@ -4,7 +4,7 @@
<view class="wraper">
<view class="containexpert" style="height:{{scrollHeight}}rpx">
<view class="containexpert" style="height:{{scrollHeight}}px">
<view class="searchbox">
<input type="text" placeholder="输入姓名或医院查找医生" disabled="{{true}}" bindtap="goSearch" bindconfirm="getIptvalue"/>
<image src="{{img_host+'/ss.png'}}"></image>

View File

@ -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();
},
/**

View File

@ -134,10 +134,10 @@
</view>
</view>
<swiper current="{{currentData}}" class="swiperbox" bindchange="bindchange" style="height:{{currentData==0?'300rpx':currentData==1?'690rpx':tab3Height+'px'}}">
<swiper current="{{currentData}}" class="swiperbox" bindchange="bindchange" style="height:{{tab3Height+'px'}}">
<swiper-item >
<view class="swiper-item">
<view class="swiper-item" id="swiperitem1">
<image src="{{img_host+'/tuwen_bg.png'}}" class="itembg" style="height:auto;" mode="widthFix" wx:if="{{canTuwen}}"></image>
<image src="{{img_host+'/tuwen_bg_disable.png'}}" class="itembg" style="height:auto;" mode="widthFix" wx:else></image>
<view class="itembox">
@ -164,7 +164,7 @@
</view>
</swiper-item>
<swiper-item>
<view class="swiper-item">
<view class="swiper-item" id="swiperitem2">
<image src="{{img_host+'/video_bg.png'}}" class="itembg" style="height:auto;" mode="widthFix" wx:if="{{canVideo}}"></image>
<image src="{{img_host+'/video_bg_disable.png'}}" style="height:auto;" mode="widthFix" class="itembg" wx:else></image>
<view class="itembox">