修改结束问诊请求,以及搜索问题

This commit is contained in:
zoujiandong 2023-08-30 14:27:05 +08:00
parent b76f5354e1
commit f6663d275c
6 changed files with 33 additions and 8 deletions

View File

@ -14,6 +14,7 @@ Page({
title: '药品清单', //导航栏 中间的标题 title: '药品清单', //导航栏 中间的标题
}, },
page:1, page:1,
isLoding:false,
list:[], list:[],
isLock:false, isLock:false,
per_page:10, per_page:10,
@ -62,13 +63,20 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
handleGetList(){ handleGetList(){
const {page,per_page,keyword}=this.data; const {page,per_page,keyword,isLoding}=this.data;
if(isLoding)return false;
this.setData({
isLoding:true
})
api.getMedinceList({ api.getMedinceList({
page, page,
per_page, per_page,
keyword, keyword,
}).then(data=>{ }).then(data=>{
this.setData({
isLoding:false
})
let result=data.data.data; let result=data.data.data;
if(result.length==0){ if(result.length==0){
this.setData({ this.setData({
@ -89,7 +97,7 @@ Page({
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() { onReady() {
}, },
/** /**

View File

@ -1,5 +1,6 @@
<!--Pages/yishi/medince_list/index.wxml--> <!--Pages/yishi/medince_list/index.wxml-->
<te-nav-bar navbar-data='{{navbarData}}'></te-nav-bar> <view class="page">
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container"> <view class="container">
<view class="searchCon"> <view class="searchCon">
<view class="searchbox"> <view class="searchbox">
@ -32,4 +33,4 @@
</scroll-view> </scroll-view>
<van-empty description="暂无数据" wx:if="{{list.length == 0}}" /> <van-empty description="暂无数据" wx:if="{{list.length == 0}}" />
</view> </view></view>

View File

@ -2,9 +2,14 @@
page{ page{
height:100vh; height:100vh;
background-color: #F6F6F6; background-color: #F6F6F6;
}
.page{
height:100vh;
display: flex;
flex-direction: column;
} }
.container{ .container{
height:calc(100vh - 135rpx); /* height:calc(100vh - 135rpx); */
display: flex; display: flex;
overflow: hidden; overflow: hidden;
/* overflow-y: scroll; */ /* overflow-y: scroll; */

View File

@ -565,11 +565,21 @@ Page({
show: false show: false
}) })
}, },
onTabClick(e){
if(e.detail.name==6){
this.setData({
current_page:0,
data_list_6:[]
})
this.getDoctorInquiryFinishMessage();
}
},
vanTabsChange(e){ vanTabsChange(e){
// // console.log(e) //console.log(e)
this.setData({ this.setData({
now_message_inquiry_type: e.detail.name now_message_inquiry_type: e.detail.name
}) });
}, },
onPullDownRefresh(){ onPullDownRefresh(){
// console.log("用户下拉动作") // console.log("用户下拉动作")

View File

@ -153,6 +153,7 @@
border="{{true}}" border="{{true}}"
id="tabs" id="tabs"
bind:change="vanTabsChange" bind:change="vanTabsChange"
bind:click="onTabClick"
wx:if="{{ has_data }}" wx:if="{{ has_data }}"
> >
<van-tab title="在线问诊" dot="{{dot_1}}" name="1" wx:if="{{data_list_1.length > 0}}"> <van-tab title="在线问诊" dot="{{dot_1}}" name="1" wx:if="{{data_list_1.length > 0}}">

View File

@ -1,6 +1,6 @@
<van-tabbar active="{{ active }}" bind:change="onChange" z-index="9999" <van-tabbar active="{{ active }}" bind:change="onChange" z-index="9999"
active-color="#3CC7C0" inactive-color="#999999" wx:if="{{usertype != 3}}" > active-color="#3CC7C0" inactive-color="#999999" wx:if="{{usertype != 3}}">
<van-tabbar-item info="{{index_info}}" data-url="{{listAll.list2[0].pagePath}}" url="{{listAll.list2[0].pagePath}}"> <van-tabbar-item info="{{index_info}}" data-url="{{listAll.list2[0].pagePath}}" url="{{listAll.list2[0].pagePath}}">
<image <image