hiv页面下拉
This commit is contained in:
parent
e3b8724b61
commit
97d9e2fb5f
@ -107,7 +107,7 @@
|
||||
<view class="cell" bindtap="goExpert">
|
||||
<!-- <image src="{{img_host+'/gdmall.png'}}" class="cellimg"></image> -->
|
||||
<image src="{{img_host+'/hiv_index.png'}}" class="cellimg"></image>
|
||||
<image src="{{img_host+'/tese_service.png'}}" class="tese"></image>
|
||||
<image src="{{img_host+'/tese_red.png'}}" class="tese" mode="widthFix"></image>
|
||||
<view class="name">合并HIV</view>
|
||||
</view>
|
||||
<view class="cell" bindtap="goHealth">
|
||||
|
||||
@ -132,8 +132,7 @@
|
||||
position: absolute;
|
||||
right:0;
|
||||
top:0;
|
||||
width: 76rpx;
|
||||
height:22rpx;
|
||||
width: 90rpx;
|
||||
}
|
||||
.cellbox .cell:first-child {
|
||||
margin-left: 0rpx;
|
||||
|
||||
@ -1,9 +1,7 @@
|
||||
// pages/expertConsult/expertConsult.js
|
||||
const app = getApp()
|
||||
import {doctorList,getProvince,getCity,getCountry} from "../../../api/consultExpert"
|
||||
import {sickType,AllKepuList} from "../../../api/common"
|
||||
let provinceArr=[{area_id:'', area_name: "全国"}];
|
||||
let cityArr=[];
|
||||
import {doctorList} from "../../../api/consultExpert"
|
||||
import {AllKepuList} from "../../../api/common"
|
||||
import {throttle} from "../../../utils/util"
|
||||
Page({
|
||||
|
||||
@ -37,6 +35,7 @@ Page({
|
||||
{ text: '服务数从多到少', value: 5},
|
||||
],
|
||||
overlay:true,
|
||||
showBg:false,
|
||||
selectkind:false,
|
||||
selectkarea:false,
|
||||
position:"全国",
|
||||
@ -86,27 +85,6 @@ Page({
|
||||
})
|
||||
this.onfresh();
|
||||
},
|
||||
onScroll(event) {
|
||||
let {doctorList}=this.data;
|
||||
wx.createSelectorQuery().select('#scroller')
|
||||
.boundingClientRect((res) => {
|
||||
let H=0;
|
||||
if(event.detail.scrollTop>78){
|
||||
if(doctorList.length<=3){
|
||||
H=53;
|
||||
}else{
|
||||
H=1;
|
||||
}
|
||||
|
||||
}else{
|
||||
H=53
|
||||
}
|
||||
this.setData({
|
||||
scrollHeight:H
|
||||
});
|
||||
|
||||
}).exec();
|
||||
},
|
||||
transforpage(arr) {
|
||||
const pages = [];
|
||||
let L= Math.ceil(arr.length / 2);
|
||||
@ -218,13 +196,7 @@ Page({
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
getSickType(){
|
||||
sickType().then((res)=>{
|
||||
this.setData({
|
||||
sickList:this.transforpage(res)
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
handleRefresher(){
|
||||
|
||||
this.setData({
|
||||
@ -253,12 +225,15 @@ Page({
|
||||
if(res.data.length==0){
|
||||
this.setData({
|
||||
lock:true,
|
||||
showBg:true,
|
||||
isTriggered:false
|
||||
});
|
||||
this.getArticleList();
|
||||
return false;
|
||||
}else{
|
||||
|
||||
this.setData({
|
||||
showBg:true,
|
||||
isTriggered:false,
|
||||
doctorList:doctorList.concat(res.data)
|
||||
})
|
||||
@ -267,51 +242,18 @@ Page({
|
||||
|
||||
})
|
||||
},
|
||||
provinceList(){
|
||||
getProvince().then((res)=>{
|
||||
provinceArr= provinceArr.concat(res);
|
||||
let province=[{area_id:'', area_name: "全国"}];//
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
province.push(res[i]);
|
||||
};
|
||||
this.setData({
|
||||
'columns[0].values':province
|
||||
})
|
||||
//this.cityList(province[0].area_id);
|
||||
|
||||
})
|
||||
},
|
||||
cityList(area_id){
|
||||
getCity({
|
||||
area_id:area_id
|
||||
}).then((res)=>{
|
||||
|
||||
cityArr=res;
|
||||
let city=[];
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
city.push(res[i]);
|
||||
};
|
||||
this.setData({
|
||||
'columns[1].values':city,
|
||||
|
||||
})
|
||||
//this.countryList(res[0].area_id);
|
||||
})
|
||||
},
|
||||
countryList(area_id){
|
||||
getCountry({
|
||||
area_id:area_id
|
||||
}).then((res)=>{
|
||||
let area=[];
|
||||
for (let i = 0; i < res.length; i++) {
|
||||
area.push(res[i]);
|
||||
};
|
||||
this.setData({
|
||||
'columns[2].values':area,
|
||||
isLoding:false
|
||||
})
|
||||
})
|
||||
},
|
||||
onScroll(event) {
|
||||
|
||||
wx.createSelectorQuery().select('#scroller')
|
||||
.boundingClientRect((res) => {
|
||||
console.log(event.detail.scrollTop)
|
||||
if(event.detail.scrollTop>1600){
|
||||
this.lower();
|
||||
}
|
||||
|
||||
|
||||
}).exec();
|
||||
},
|
||||
onfresh(){
|
||||
this.setData({
|
||||
page:1,
|
||||
@ -350,9 +292,9 @@ Page({
|
||||
inquiry_mode:1
|
||||
})
|
||||
}
|
||||
this.getSickType();
|
||||
|
||||
this.getDoctorList();
|
||||
this.provinceList();
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
@ -2,39 +2,12 @@
|
||||
<nav navName="HIV"></nav>
|
||||
<wxs src="../../../filters/filter.wxs" module="moduleFilter"></wxs>
|
||||
|
||||
<view class="wraper">
|
||||
|
||||
<!--<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>
|
||||
<view class="page-section-spacing" >
|
||||
<scroll-view class="scroll-view_H" scroll-x="true" style="width: 100%">
|
||||
<view class="row" wx:for="{{sickList}}" wx:for-index="idx" wx:for-item="itemName" wx:key="idx">
|
||||
<view class="scroll-view-item_H {{tabId==item.expertise_id?'active':''}}" wx:for="{{itemName}}" wx:key="expertise_id" data-id="{{item.expertise_id}}" bindtap="switchTab" >{{item.expertise_name}}</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<!-- <view class="dropdown">
|
||||
<van-dropdown-menu active-color="#3CC7C0" overlay="{{overlay}}" style="width:66.66%;position: relative;">
|
||||
<view class="bar"></view>
|
||||
<van-dropdown-item title-class="droptitle {{selectarea?'active':''}}" title="{{position}}" bind:open="openCity" bind:close="closeCity" id="item" popup-style="itemPop" > </van-dropdown-item>
|
||||
<view class="dropbar"></view>
|
||||
<van-dropdown-item title-class="droptitle {{selectkind?'active':''}}" value="{{ sort_order }}" options="{{ option }}" bind:change="changeSorder" />
|
||||
</van-dropdown-menu>
|
||||
<view class="dropOnline {{is_online==1?'active':''}}" bindtap="toggleOnline">优先在线</view>
|
||||
</view> -->
|
||||
|
||||
|
||||
|
||||
|
||||
<view class="scrollwraper">
|
||||
<scroll-view scroll-y style="width: 100%;height:100%" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="350" refresher-enabled="true" bindscrolltolower="lower" bind:scroll="onScroll" id="scroller" bounces="false">
|
||||
<image src="{{img_host+'/hiv_bg.png'}}" mode="widthFix" class="bananerimg"/>
|
||||
<view wx:if="{{doctorList.length>0}}" style=" margin:-120rpx 20rpx 0;background: #fff;position: relative;z-index:1;border-radius: 20rpx;overflow: hidden;">
|
||||
<view class="wraper" style="height:calc(100vh - 180rpx);">
|
||||
<scroll-view scroll-y style="overflow-y: scroll;width: 100%;flex:1;" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}"
|
||||
bindscroll="onScroll"
|
||||
refresher-threshold="800" refresher-enabled="true" bindscrolltolower="lower" id="scroller" bounces="false">
|
||||
<image src="{{img_host+'/hiv_bg.png'}}" mode="widthFix" class="bananerimg"/>
|
||||
<view wx:if="{{doctorList.length>0}}" style="margin:-120rpx 20rpx 0;background: #fff;border-radius: 20rpx;position:realtive; z-index:1;padding-bottom: 20rpx;">
|
||||
<view class="viewcell" bindtap="goExpertDetail" wx:for="{{doctorList}}" wx:key="doctor_id" data-doctorid="{{item.doctor_id}}">
|
||||
<view class="left">
|
||||
|
||||
@ -70,31 +43,31 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="bar_classify" wx:if="{{articeList.length>0}}"></view>
|
||||
<view class="classify" wx:if="{{articeList.length>0}}">
|
||||
|
||||
<view class="titlename">关于HIV你知道多少?</view>
|
||||
<view class="classifybox">
|
||||
<view class="cell" wx:for="{{articeList}}" wx:key="article_id" bind:tap="goArticle" data-url="{{item.article_url}}">
|
||||
<view class="left">
|
||||
<view class="title">{{item.article_title}}</view>
|
||||
<view class="origin">
|
||||
<image src="{{item.article_science_source.source_image}}" mode="heightFix" class="logo"/>
|
||||
<view class="originname">{{item.article_science_source.source_name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-image class="article_img" width="254rpx" height="154rpx" radius="10rpx" fit="cover" src="{{item.article_image}}" />
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="nonedata" wx:else>暂无数据!</view> -->
|
||||
|
||||
</scroll-view>
|
||||
<!-- <view class="nonedata" wx:else>暂无数据!</view> -->
|
||||
<view class="bar_classify" ></view>
|
||||
<view class="classify" wx:if="{{articeList.length>0}}">
|
||||
|
||||
<view class="titlename">关于HIV你知道多少?</view>
|
||||
<view class="classifybox">
|
||||
<view class="cell" wx:for="{{articeList}}" wx:key="article_id" bind:tap="goArticle" data-url="{{item.article_url}}">
|
||||
<view class="left">
|
||||
<view class="title">{{item.article_title}}</view>
|
||||
<view class="origin">
|
||||
<image src="{{item.article_science_source.source_image}}" mode="heightFix" class="logo"/>
|
||||
<view class="originname">{{item.article_science_source.source_name}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<van-image class="article_img" width="254rpx" height="154rpx" radius="10rpx" fit="cover" src="{{item.article_image}}" />
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<van-popup
|
||||
show="{{ show }}"
|
||||
|
||||
@ -102,6 +102,7 @@
|
||||
}
|
||||
.viewcell:last-child{
|
||||
border-bottom: none;
|
||||
|
||||
}
|
||||
.viewcell .type{
|
||||
height: 32rpx;
|
||||
@ -233,8 +234,10 @@ font-size: 30rpx;
|
||||
flex-direction: column;
|
||||
}
|
||||
.bananerimg{
|
||||
margin-top:0rpx;
|
||||
position: relative;
|
||||
width:750rpx;
|
||||
z-index:-2;
|
||||
|
||||
|
||||
}
|
||||
.scrollwraper{
|
||||
@ -318,7 +321,7 @@ font-size: 30rpx;
|
||||
.classify{
|
||||
overflow: hidden;
|
||||
margin:0 20rpx;
|
||||
padding-bottom: 200rpx;
|
||||
padding-bottom: 40rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.bar_classify{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user