11.1 文章
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
// pages/expertConsult/expertConsult.js
|
||||
const app = getApp()
|
||||
import {doctorList,getProvince,getCity,getCountry} from "../../../api/consultExpert"
|
||||
import {sickType} from "../../../api/common"
|
||||
import {sickType,AllKepuList} from "../../../api/common"
|
||||
let provinceArr=[{area_id:'', area_name: "全国"}];
|
||||
let cityArr=[];
|
||||
import {throttle} from "../../../utils/util"
|
||||
@@ -19,6 +19,7 @@ Page({
|
||||
province_id:'',
|
||||
city_id:'',
|
||||
keyword:'',
|
||||
articeList:[],
|
||||
lock:false,
|
||||
is_online:0,
|
||||
sort_order:1,
|
||||
@@ -62,6 +63,23 @@ Page({
|
||||
delta: 1,
|
||||
})
|
||||
},
|
||||
getArticleList(){
|
||||
|
||||
AllKepuList({
|
||||
basic_class_id:1
|
||||
}).then((res)=>{
|
||||
console.log(res);
|
||||
this.setData({
|
||||
articeList:res
|
||||
});
|
||||
|
||||
})
|
||||
},
|
||||
goArticle:throttle(function(event){
|
||||
app.method.navigateTo({
|
||||
url:"/patient/pages/linkPage/linkPage?url="+encodeURIComponent(event.currentTarget.dataset.url)
|
||||
})
|
||||
}),
|
||||
toggleOnline(){
|
||||
this.setData({
|
||||
is_online:this.data.is_online==0?1:0
|
||||
@@ -237,6 +255,7 @@ Page({
|
||||
lock:true,
|
||||
isTriggered:false
|
||||
});
|
||||
this.getArticleList();
|
||||
return false;
|
||||
}else{
|
||||
this.setData({
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"van-dropdown-menu": "@vant/weapp/dropdown-menu/index",
|
||||
"van-dropdown-item": "@vant/weapp/dropdown-item/index",
|
||||
"van-picker": "@vant/weapp/picker/index",
|
||||
|
||||
"van-image": "@vant/weapp/image/index",
|
||||
"van-popup": "@vant/weapp/popup/index",
|
||||
"van-sticky": "@vant/weapp/sticky/index",
|
||||
"nav":"../../../components/nav/nav"
|
||||
|
||||
@@ -3,8 +3,9 @@
|
||||
<wxs src="../../../filters/filter.wxs" module="moduleFilter"></wxs>
|
||||
|
||||
<view class="wraper">
|
||||
<view class="containexpert" style="{{'height:'+scrollHeight+'px'}}">
|
||||
<view class="searchbox">
|
||||
|
||||
<!--<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>
|
||||
@@ -15,9 +16,9 @@
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
<view class="dropdown">
|
||||
<!-- <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>
|
||||
@@ -25,14 +26,15 @@
|
||||
<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> -->
|
||||
|
||||
|
||||
|
||||
|
||||
<view class="scrollwraper">
|
||||
<scroll-view scroll-y style="width: 100%;height:100%" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" bindscrolltolower="lower" bind:scroll="onScroll" id="scroller" bounces="false">
|
||||
<view wx:if="{{doctorList.length>0}}">
|
||||
<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="viewcell" bindtap="goExpertDetail" wx:for="{{doctorList}}" wx:key="doctor_id" data-doctorid="{{item.doctor_id}}">
|
||||
<view class="left">
|
||||
|
||||
@@ -68,34 +70,30 @@
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="nonedata" wx:else>暂无数据!</view>
|
||||
<!-- <view class="viewcell">
|
||||
<view class="left">
|
||||
<image src="https://img.applets.igandanyiyuan.com/applet/patient/static/home.png"></image>
|
||||
<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 class="right">
|
||||
<view class="namebox">
|
||||
<view class="name">魏胜昭</view>
|
||||
<view class="position"> 教授</view>
|
||||
<view class="type">三甲</view>
|
||||
<view class="type">可处方</view>
|
||||
</view>
|
||||
<view class="hospital">首都医科大学佑安医院 <text decode="true"> 耳鼻科</text></view>
|
||||
<view class="goodjob">擅长:治疗耳鼻喉疑难病。比如: 人工关节置换、传导性耳聋、人工晶体植入、肾移···</view>
|
||||
<view class="diseaseType">中西医结合</view>
|
||||
<view class="detail">
|
||||
<view>好评率: <text>5 </text> </view>
|
||||
<view>服务患者数: <text>100</text></view>
|
||||
<view>平均回复: <text> 0.5h </text></view>
|
||||
</view>
|
||||
<view class="consultbox">
|
||||
<view class="price">公益问诊:<text>¥100</text></view>
|
||||
<view class="consult">立即咨询</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="nonedata" wx:else>暂无数据!</view> -->
|
||||
|
||||
</scroll-view>
|
||||
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<van-popup
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/* pages/expertConsult/expertConsult.wxss */
|
||||
.wraper{
|
||||
|
||||
background: #F2F2F2;
|
||||
height: 100%;
|
||||
}
|
||||
.containexpert{
|
||||
@@ -95,6 +95,7 @@
|
||||
box-sizing: border-box;
|
||||
padding:40rpx 30rpx 30rpx;
|
||||
width:100%;
|
||||
|
||||
border-radius: 10rpx;
|
||||
background-color: #fff;
|
||||
border-bottom: 1rpx solid #E7E7E7;
|
||||
@@ -226,11 +227,20 @@ font-size: 30rpx;
|
||||
}
|
||||
|
||||
.wraper{
|
||||
overflow: hidden;
|
||||
margin-top: 172rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.bananerimg{
|
||||
margin-top:0rpx;
|
||||
width:750rpx;
|
||||
|
||||
}
|
||||
.scrollwraper{
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
flex:1;
|
||||
|
||||
overflow-y: scroll;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
}
|
||||
@@ -303,4 +313,74 @@ font-size: 30rpx;
|
||||
}
|
||||
.nonekaitong text{
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.classify{
|
||||
overflow: hidden;
|
||||
margin:0 20rpx;
|
||||
padding-bottom: 200rpx;
|
||||
border-radius: 20rpx;
|
||||
}
|
||||
.bar_classify{
|
||||
background: #F2F2F2;
|
||||
width:100%;
|
||||
height:30rpx;
|
||||
}
|
||||
.classify .cell{
|
||||
overflow: hidden;
|
||||
border-bottom: 1rpx solid #E7E7E7;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding:30rpx 30rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
.classify .article_img{
|
||||
border-radius: 10rpx;
|
||||
width: 254rpx;
|
||||
object-fit: cover;
|
||||
height: 154rpx;
|
||||
}
|
||||
.classify .title{
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: 400;
|
||||
line-height: 43rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.classify .origin{
|
||||
display: flex;
|
||||
align-items:center ;
|
||||
}
|
||||
.classify .titlename{
|
||||
border-bottom: 1rpx solid #E7E7E7;
|
||||
width:100%;
|
||||
height: 106rpx;
|
||||
background: #FFFFFF;
|
||||
display: flex;
|
||||
padding:0 32rpx;
|
||||
font-weight: 500;
|
||||
font-size: 34rpx;
|
||||
color: #333333;
|
||||
align-items: center;
|
||||
}
|
||||
.classify .left{
|
||||
flex:1;
|
||||
margin-right: 28rpx;
|
||||
display: flex;
|
||||
height: 154rpx;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.classify .originname{
|
||||
margin-left: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.classify .logo{
|
||||
height:38rpx;
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
// patient/pages/kepuList.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
<!--patient/pages/kepuList.wxml-->
|
||||
<text>patient/pages/kepuList.wxml</text>
|
||||
@@ -0,0 +1 @@
|
||||
/* patient/pages/kepuList.wxss */
|
||||
@@ -0,0 +1,120 @@
|
||||
// patient/pages/kepuList/kepuList.js
|
||||
import {kepuList} from "../../../api/common"
|
||||
import {throttle} from "../../../utils/util"
|
||||
const app = getApp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
isTriggered:false,
|
||||
page:1,
|
||||
keyword:'',
|
||||
lock:false,
|
||||
list:[]
|
||||
},
|
||||
handleRefresher(){
|
||||
this.setData({
|
||||
lock:false,
|
||||
page:1,
|
||||
list:[]
|
||||
});
|
||||
this.getList()
|
||||
},
|
||||
getList(){
|
||||
let {page,keyword}=this.data;
|
||||
kepuList({
|
||||
keyword:keyword,
|
||||
page:page,
|
||||
per_page:10
|
||||
}).then((res)=>{
|
||||
console.log(res)
|
||||
let {list}=this.data;
|
||||
if(res.data.length==0){
|
||||
this.setData({
|
||||
lock:true,
|
||||
isTriggered:false
|
||||
});
|
||||
return false;
|
||||
}else{
|
||||
this.setData({
|
||||
isTriggered:false,
|
||||
list:list.concat(res.data)
|
||||
})
|
||||
}
|
||||
console.log(this.data.list)
|
||||
|
||||
})
|
||||
},
|
||||
goArticle:throttle(function(event){
|
||||
app.method.navigateTo({
|
||||
url:"/patient/pages/linkPage/linkPage?url="+encodeURIComponent(event.currentTarget.dataset.url)
|
||||
})
|
||||
}),
|
||||
lower(e) {
|
||||
let {lock}=this.data;
|
||||
let addPage=this.data.page+1;
|
||||
if(!lock){
|
||||
this.setData({
|
||||
page:addPage
|
||||
});
|
||||
this.getList();
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.getList()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom() {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage() {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"nav":"../../../components/nav/nav",
|
||||
"van-image": "@vant/weapp/image/index"
|
||||
},
|
||||
"navigationStyle":"custom",
|
||||
"disableScroll":true
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
<!--patient/pages/kepuList/kepuList.wxml-->
|
||||
<nav navName="科普文章"></nav>
|
||||
<view class="scrollwraper">
|
||||
<scroll-view scroll-y style="width: 100%;height:100%" bindrefresherrefresh="handleRefresher" refresher-triggered="{{isTriggered}}" refresher-threshold="100" refresher-enabled="true" bindscrolltolower="lower" id="scroller" bounces="false">
|
||||
<view class="cell" wx:for="{{list}}" 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}}" />
|
||||
<!-- <image src="{{item.article_image}}" mode="" class="article_img"/> -->
|
||||
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
@@ -0,0 +1,52 @@
|
||||
/* patient/pages/kepuList/kepuList.wxss */
|
||||
.scrollwraper{
|
||||
margin-top: 172rpx;
|
||||
height:calc(100vh - 172rpx);
|
||||
}
|
||||
.cell{
|
||||
overflow: hidden;
|
||||
border-bottom: 1rpx solid #E7E7E7;
|
||||
display: flex;
|
||||
margin:0 30rpx;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding:30rpx 0;
|
||||
background-color: #fff;
|
||||
}
|
||||
.article_img{
|
||||
border-radius: 10rpx;
|
||||
width: 254rpx;
|
||||
object-fit: cover;
|
||||
height: 154rpx;
|
||||
}
|
||||
.title{
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
font-weight: 400;
|
||||
line-height: 43rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.origin{
|
||||
display: flex;
|
||||
align-items:center ;
|
||||
}
|
||||
.left{
|
||||
flex:1;
|
||||
margin-right: 28rpx;
|
||||
display: flex;
|
||||
height: 154rpx;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.originname{
|
||||
margin-left: 10rpx;
|
||||
font-size: 24rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.logo{
|
||||
height:38rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user