This commit is contained in:
zoujiandong
2024-04-18 09:57:18 +08:00
parent f1f2f3a821
commit 89afe588b7
12 changed files with 351 additions and 111 deletions
+60 -4
View File
@@ -35,6 +35,10 @@ Page({
canTuwen:false,
canVideo:false,
canDiffcult:false,
canHealthy:false,
canVisit:false,
healthyPrice:'',
visitPrice:'',
brief_introduction:'',
multi_point_status: 0,
multi_point_enable:0,
@@ -130,6 +134,7 @@ bindchange(e){
},
switchTab(e){
let {id}=e. currentTarget.dataset;
console.log(id);
this.setData({
currentData:Number(id)
})
@@ -141,18 +146,29 @@ bindchange(e){
})
}else if(id==1){
this.getHeight(2);
this.setData({
inquiry_type:1,
inquiry_mode:9,
tab3Height:0
})
}else if(id==2){
this.setData({
inquiry_type:1,
inquiry_mode:8,
tab3Height:0
})
}else if(id==3){
this.getHeight(4);
let {hasVideoList,canVideo}=this.data;
this.setData({
inquiry_type:1,
inquiry_mode:2
inquiry_mode:2,
})
if(hasVideoList && !canVideo){
this.goVideo();
}
}else {
this.getHeight(3)
this.getHeight(5)
this.setData({
inquiry_type:1,
inquiry_mode:6
@@ -333,6 +349,26 @@ bindchange(e){
yinanPrice:arr[i].inquiry_price
})
}
if(arr[i].inquiry_type==1 && arr[i].inquiry_mode==8){
if(arr[i].is_enable==1){
this.setData({
canHealthy:true
})
}
this.setData({
healthyPrice: arr[i].inquiry_price
})
}
if(arr[i].inquiry_type==1 && arr[i].inquiry_mode==9){
if(arr[i].is_enable==1){
this.setData({
canVisit:true
})
}
this.setData({
visitPrice: arr[i].inquiry_price
})
}
}
}
@@ -367,6 +403,26 @@ bindchange(e){
cycle:arr[i].duration
})
};
if(arr[i].inquiry_type==1 && arr[i].inquiry_mode==8){
if(arr[i].is_enable==1){
this.setData({
canHealthy:true
})
}
this.setData({
healthyPrice: arr[i].inquiry_price
})
}
if(arr[i].inquiry_type==1 && arr[i].inquiry_mode==9){
if(arr[i].is_enable==1){
this.setData({
canVisit:true
})
}
this.setData({
visitPrice: arr[i].inquiry_price
})
}
if(arr[i].inquiry_type==1 && arr[i].inquiry_mode==2){
if(arr[i].is_enable==1){
this.setData({
+29 -22
View File
@@ -75,7 +75,7 @@
<view class="tabbox">
<view class="tabs">
<view class="tab " bindtap="switchTab" data-id="0">
<image wx:if="{{currentData==0 && canTuwen}}" src="{{img_host+'/tuwen_on.png'}}" alt="" class="tabbg on" ></image>
<image wx:if="{{currentData==0 && canTuwen}}" src="{{img_host+'/tuwen_on.png'}}" alt="" class="tabbg on" ></image>
<image wx:elif="{{currentData==0 && !canTuwen}}" src="{{img_host+'/tuwen_disable_on.png'}}" alt="" class="tabbg on" ></image>
<image wx:elif="{{currentData!=0 && canTuwen}}" src="{{img_host+'/tuwen.png'}}" alt="" class="tabbg" ></image>
<image wx:else src="{{img_host+'/tuwen_disable.png'}}" alt="" class="tabbg" ></image>
@@ -105,28 +105,33 @@
<view class="price" wx:if="{{!(expertInquiry_price && freePrice)}}">暂未开通</view>
</view>
</view>
<view class="tab add" bindtap="switchTab" data-id="3">
<image src="../../static/images/suifang_on.png" alt="" class="tabbg" ></image>
<view class="tab add" bindtap="switchTab" data-id="1">
<image src="../../static/images/suifang_on.png" alt="" class="tabbg" wx:if="{{canVisit}}"></image>
<image src="../../static/images/suifang_disable.png" alt="" class="tabbg" wx:else></image>
<view class="typebox" >
<view class="name">随访包</view>
<view class="price">¥150起</view>
<view class="price" wx:if="{{visitPrice}}">¥{{visitPrice}}起</view>
<view class="price" wx:else>暂未开通</view>
</view>
<!-- <view class="typebox disable" wx:else >
<view class="name">视频问诊</view>
<view class="price">{{videoPrice?'¥'+videoPrice+'/次':'暂未开通'}}</view>
</view> -->
</view>
<view class="tab add" bindtap="switchTab" data-id="4">
<image src="../../static/images/healthy_on.png" alt="" class="tabbg" ></image>
<view class="tab add" bindtap="switchTab" data-id="2">
<image src="../../static/images/healthy_on.png" alt="" class="tabbg" wx:if="{{canHealthy}}"></image>
<image src="../../static/images/healthy_disable.png" alt="" class="tabbg" wx:else></image>
<view class="typebox" >
<view class="name">随访包</view>
<view class="price">¥1260/次</view>
<view class="name">健康包</view>
<view class="price" wx:if="{{healthyPrice}}">¥{{healthyPrice}}/次</view>
<view class="price" wx:else>暂未开通</view>
</view>
</view>
<view class="tab " bindtap="switchTab" data-id="1">
<image src="{{img_host+'/video_on.png'}}" wx:if="{{currentData==1 && canVideo}}" alt="" class="tabbg on" ></image>
<image wx:elif="{{currentData==1 && !canVideo}}" src="{{img_host+'/video_disable_on.png'}}" alt="" class="tabbg on" ></image>
<image wx:elif="{{currentData!=1 && canVideo}}" src="{{img_host+'/video.png'}}" alt="" class="tabbg" ></image>
<view class="tab " bindtap="switchTab" data-id="3">
<image src="{{img_host+'/video_on.png'}}" wx:if="{{currentData==3 && canVideo}}" alt="" class="tabbg on" ></image>
<image wx:elif="{{currentData==3 && !canVideo}}" src="{{img_host+'/video_disable_on.png'}}" alt="" class="tabbg on" ></image>
<image wx:elif="{{currentData!=3 && canVideo}}" src="{{img_host+'/video.png'}}" alt="" class="tabbg" ></image>
<image wx:else src="{{img_host+'/video_disable.png'}}" alt="" class="tabbg" ></image>
<view class="typebox" wx:if="{{canVideo}}">
<view class="name">视频问诊</view>
@@ -138,10 +143,10 @@
</view>
</view>
<view class="tab " bindtap="switchTab" data-id="2">
<image wx:if="{{currentData==2 && canDiffcult}}" src="{{img_host+'/yinan_on.png'}}" alt="" class="tabbg on" ></image>
<image wx:elif="{{currentData==2 && !canDiffcult}}" src="{{img_host+'/yinan_disable_on.png'}}" alt="" class="tabbg on" ></image>
<image wx:elif="{{currentData!=2 && canDiffcult}}" src="{{img_host+'/yinan.png'}}" alt="" class="tabbg" ></image>
<view class="tab " bindtap="switchTab" data-id="4">
<image wx:if="{{currentData==4 && canDiffcult}}" src="{{img_host+'/yinan_on.png'}}" alt="" class="tabbg on" ></image>
<image wx:elif="{{currentData==4 && !canDiffcult}}" src="{{img_host+'/yinan_disable_on.png'}}" alt="" class="tabbg on" ></image>
<image wx:elif="{{currentData!=4 && canDiffcult}}" src="{{img_host+'/yinan.png'}}" alt="" class="tabbg" ></image>
<image wx:else src="{{img_host+'/yinan_disable.png'}}" alt="" class="tabbg" ></image>
<view class="typebox" wx:if="{{canDiffcult}}">
<view class="name">疑难问诊</view>
@@ -184,8 +189,10 @@
</view>
</view>
</swiper-item>
<swiper-item class="swiper-item" id="swiperitem2"> </swiper-item>
<swiper-item class="swiper-item" id="swiperitem3"> </swiper-item>
<swiper-item>
<view class="swiper-item" id="swiperitem2">
<view class="swiper-item" id="swiperitem4">
<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">
@@ -228,7 +235,7 @@
</view>
</swiper-item>
<swiper-item >
<view class="swiper-item" id="swiperitem3">
<view class="swiper-item" id="swiperitem5">
<image src="{{img_host+'/yinan_bg.png'}}" class="itembg" wx:if="{{canDiffcult}}" style="height:auto;" mode="widthFix"></image>
<image src="{{img_host+'/video_bg_disable.png'}}" class="itembg" style="height:auto;" mode="widthFix" wx:else></image>
<view class="itembox">
@@ -338,10 +345,10 @@
</view>
<!-- <view></view> -->
<view class="ask" wx:if="{{(current_inquiry_config && current_inquiry_config.recieveStatus>0) && currentData==0}}" bindtap="handleThrottle" hidden="{{!isFinished}}" data-type="{{currentData}}">立即咨询</view>
<view class="ask" wx:elif="{{canVideo && currentData==1}}" bindtap="handleThrottle" hidden="{{!isFinished}}" data-type="{{currentData}}">立即咨询</view>
<view class="noask" wx:elif="{{!canVideo && currentData==1 && !hasVideoList}}" hidden="{{!isFinished}}" data-type="{{currentData}}">暂不接诊</view>
<view class="noask" wx:elif="{{!canVideo && currentData==1 && hasVideoList}}" hidden="{{!isFinished}}" data-type="{{currentData}}">{{videoPrice?'暂不接诊':'暂未开通'}}</view>
<view class="ask" wx:elif="{{canDiffcult && currentData==2}}" bindtap="handleThrottle" hidden="{{!isFinished}}" data-type="{{currentData}}">立即咨询</view>
<view class="ask" wx:elif="{{canVideo && currentData==3}}" bindtap="handleThrottle" hidden="{{!isFinished}}" data-type="{{currentData}}">立即咨询</view>
<view class="noask" wx:elif="{{!canVideo && currentData==3 && !hasVideoList}}" hidden="{{!isFinished}}" data-type="{{currentData}}">暂不接诊</view>
<view class="noask" wx:elif="{{!canVideo && currentData==3 && hasVideoList}}" hidden="{{!isFinished}}" data-type="{{currentData}}">{{videoPrice?'暂不接诊':'暂未开通'}}</view>
<view class="ask" wx:elif="{{canDiffcult && currentData==4}}" bindtap="handleThrottle" hidden="{{!isFinished}}" data-type="{{currentData}}">立即咨询</view>
<view class="noask" wx:elif="{{!canDiffcult && currentData==2}}" hidden="{{!isFinished}}" data-type="{{currentData}}">{{yinanPrice?'暂不接诊':'暂未开通'}}</view>
<view class="noask" bindtap="notAsk" data-type="{{currentData}}" wx:else hidden="{{!isFinished}}">{{(!current_inquiry_config.inquiry_price && !expertInquiry_price)?'暂未开通':'暂不接诊'}}</view>
</view>