3.26上传更改tab
This commit is contained in:
parent
4ae2b50539
commit
1ba1db521f
@ -25,7 +25,7 @@ Page({
|
|||||||
inquiry_type:'1,3',
|
inquiry_type:'1,3',
|
||||||
inquiry_mode:'1,2',
|
inquiry_mode:'1,2',
|
||||||
navName:"专家问诊",
|
navName:"专家问诊",
|
||||||
scrollHeight:300,
|
scrollHeight:150,
|
||||||
sickList:[],
|
sickList:[],
|
||||||
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
|
img_host:'https://oss.prod.applets.igandanyiyuan.com/applet/patient/static',
|
||||||
option: [
|
option: [
|
||||||
@ -73,10 +73,10 @@ Page({
|
|||||||
.boundingClientRect((res) => {
|
.boundingClientRect((res) => {
|
||||||
// console.log(event.detail.scrollTop)
|
// console.log(event.detail.scrollTop)
|
||||||
let H=0;
|
let H=0;
|
||||||
if(event.detail.scrollTop>350){
|
if(event.detail.scrollTop>=175){
|
||||||
H=0;
|
H=0;
|
||||||
}else{
|
}else{
|
||||||
H=300
|
H=150
|
||||||
}
|
}
|
||||||
this.setData({
|
this.setData({
|
||||||
//scrollTop: event.detail.scrollTop,
|
//scrollTop: event.detail.scrollTop,
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
<view class="wraper">
|
<view class="wraper">
|
||||||
|
|
||||||
<view class="containexpert" style="height:{{scrollHeight}}rpx">
|
<view class="containexpert" style="height:{{scrollHeight}}px">
|
||||||
<view class="searchbox">
|
<view class="searchbox">
|
||||||
<input type="text" placeholder="输入姓名或医院查找医生" disabled="{{true}}" bindtap="goSearch" bindconfirm="getIptvalue"/>
|
<input type="text" placeholder="输入姓名或医院查找医生" disabled="{{true}}" bindtap="goSearch" bindconfirm="getIptvalue"/>
|
||||||
<image src="{{img_host+'/ss.png'}}"></image>
|
<image src="{{img_host+'/ss.png'}}"></image>
|
||||||
|
|||||||
@ -72,8 +72,9 @@ Page({
|
|||||||
cycle:'',
|
cycle:'',
|
||||||
rounds:''
|
rounds:''
|
||||||
},
|
},
|
||||||
getHeight(){
|
getHeight(id){
|
||||||
wx.createSelectorQuery().select('#swiperitem3').boundingClientRect( (rect)=>{
|
console.log("id:"+id);
|
||||||
|
wx.createSelectorQuery().select('#swiperitem'+id).boundingClientRect( (rect)=>{
|
||||||
this.setData({
|
this.setData({
|
||||||
tab3Height:(rect.height)
|
tab3Height:(rect.height)
|
||||||
})
|
})
|
||||||
@ -133,12 +134,15 @@ bindchange(e){
|
|||||||
currentData:Number(id)
|
currentData:Number(id)
|
||||||
})
|
})
|
||||||
if(id==0){
|
if(id==0){
|
||||||
|
this.getHeight(1)
|
||||||
this.setData({
|
this.setData({
|
||||||
inquiry_type:this.data.current_inquiry_config.inquiry_type,
|
inquiry_type:this.data.current_inquiry_config.inquiry_type,
|
||||||
inquiry_mode:this.data.current_inquiry_config.inquiry_mode
|
inquiry_mode:this.data.current_inquiry_config.inquiry_mode
|
||||||
})
|
})
|
||||||
|
|
||||||
}else if(id==1){
|
}else if(id==1){
|
||||||
let {hasVideoList,canVideo}=this.data;
|
this.getHeight(2);
|
||||||
|
let {hasVideoList,canVideo}=this.data;
|
||||||
this.setData({
|
this.setData({
|
||||||
inquiry_type:1,
|
inquiry_type:1,
|
||||||
inquiry_mode:2
|
inquiry_mode:2
|
||||||
@ -146,12 +150,15 @@ bindchange(e){
|
|||||||
if(hasVideoList && !canVideo){
|
if(hasVideoList && !canVideo){
|
||||||
this.goVideo();
|
this.goVideo();
|
||||||
}
|
}
|
||||||
|
|
||||||
}else {
|
}else {
|
||||||
|
this.getHeight(3)
|
||||||
this.setData({
|
this.setData({
|
||||||
inquiry_type:1,
|
inquiry_type:1,
|
||||||
inquiry_mode:6
|
inquiry_mode:6
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
confirm(event) {
|
confirm(event) {
|
||||||
let {id}=this.data;
|
let {id}=this.data;
|
||||||
@ -470,9 +477,7 @@ bindchange(e){
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setTimeout(()=>{
|
|
||||||
this.getHeight()
|
|
||||||
},800)
|
|
||||||
|
|
||||||
if(this.data.canTuwen){
|
if(this.data.canTuwen){
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -480,6 +485,7 @@ bindchange(e){
|
|||||||
inquiry_type:this.data.current_inquiry_config.inquiry_type,
|
inquiry_type:this.data.current_inquiry_config.inquiry_type,
|
||||||
inquiry_mode:this.data.current_inquiry_config.inquiry_mode
|
inquiry_mode:this.data.current_inquiry_config.inquiry_mode
|
||||||
})
|
})
|
||||||
|
this.getHeight(1)
|
||||||
}else{
|
}else{
|
||||||
if(this.data.canVideo){
|
if(this.data.canVideo){
|
||||||
let {hasVideoList,canVideo}=this.data;
|
let {hasVideoList,canVideo}=this.data;
|
||||||
@ -491,7 +497,7 @@ bindchange(e){
|
|||||||
if(hasVideoList && !canVideo){
|
if(hasVideoList && !canVideo){
|
||||||
this.goVideo();
|
this.goVideo();
|
||||||
}
|
}
|
||||||
|
this.getHeight(2)
|
||||||
}else{
|
}else{
|
||||||
if(this.data.canDiffcult){
|
if(this.data.canDiffcult){
|
||||||
this.setData({
|
this.setData({
|
||||||
@ -499,6 +505,9 @@ bindchange(e){
|
|||||||
inquiry_type:1,
|
inquiry_type:1,
|
||||||
inquiry_mode:6
|
inquiry_mode:6
|
||||||
})
|
})
|
||||||
|
this.getHeight(3)
|
||||||
|
}else{
|
||||||
|
this.getHeight(1)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -519,6 +528,7 @@ bindchange(e){
|
|||||||
this.setData({
|
this.setData({
|
||||||
doctor_id:doctor_id
|
doctor_id:doctor_id
|
||||||
})
|
})
|
||||||
|
|
||||||
this.getDeatil(doctor_id);
|
this.getDeatil(doctor_id);
|
||||||
this.getService(doctor_id);
|
this.getService(doctor_id);
|
||||||
this.getEvaluationList();
|
this.getEvaluationList();
|
||||||
|
|||||||
@ -134,10 +134,10 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
</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 >
|
<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.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>
|
<image src="{{img_host+'/tuwen_bg_disable.png'}}" class="itembg" style="height:auto;" mode="widthFix" wx:else></image>
|
||||||
<view class="itembox">
|
<view class="itembox">
|
||||||
@ -164,7 +164,7 @@
|
|||||||
</view>
|
</view>
|
||||||
</swiper-item>
|
</swiper-item>
|
||||||
<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.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>
|
<image src="{{img_host+'/video_bg_disable.png'}}" style="height:auto;" mode="widthFix" class="itembg" wx:else></image>
|
||||||
<view class="itembox">
|
<view class="itembox">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user