This commit is contained in:
haomingming
2023-04-08 09:51:45 +08:00
parent 6fa2a5eaa9
commit 3f40c4c237
69 changed files with 1274 additions and 338 deletions
+3 -8
View File
@@ -44,6 +44,7 @@ Page({
this.setData({
doctor_id: option.doctor_id
})
},
onShow(){
console.log("onShow");
@@ -51,21 +52,15 @@ Page({
},
onTabsChange(e){
console.log(e);
let list_name = "appraise_list_" + e.detail.value;
let list_name = "appraise_list_" + e.detail.name;
this.setData({
evaluation_type: e.detail.value,
evaluation_type: e.detail.name,
current_page: 0,
last_page: 0,
[list_name]: []
})
this.getDoctorEvaluationList()
},
onTabsClick(e){
console.log(e);
},
onStickyScroll(e){
return 1;
},
getDoctorEvaluationList(){
//获取评价列表
let params = {};
+5 -3
View File
@@ -3,9 +3,11 @@
"usingComponents": {
"te-nav-bar": "/commpents/te_navbar",
"appraise-data": "/commpents/appraise_data/index",
"t-tabs": "tdesign-miniprogram/tabs/tabs",
"t-tab-panel": "tdesign-miniprogram/tab-panel/tab-panel",
"van-empty": "@vant/weapp/empty/index"
"van-empty": "@vant/weapp/empty/index",
"van-tab": "@vant/weapp/tab/index",
"van-tabs": "@vant/weapp/tabs/index",
"t-rate": "tdesign-miniprogram/rate/rate",
"van-divider": "@vant/weapp/divider/index"
},
"enablePullDownRefresh": true,
"onReachBottomDistance": 100
+60 -3
View File
@@ -1,6 +1,63 @@
<te-nav-bar navbar-data='{{navbarData}}' ></te-nav-bar>
<view class="container" style="height: calc(100vh - 96rpx - {{height}}px);">
<t-tabs
<view class="container">
<van-tabs active="1"
color="#3CC7C0"
title-active-color="#3CC7C0"
bind:change="onTabsChange"
border="{{true}}"
>
<van-tab title="全部({{total_quantity}})" name="1">
<view class="item_list">
<view class="item" wx:for="{{appraise_list_1}}">
<view class="top">
<view class="name">{{item.name_mask}}</view>
<view class="start">
<t-rate value="{{item.avg_score}}" count="{{item.avg_score}}" color="#ED9C00"/>
</view>
</view>
<view class="content">{{item.content}}</view>
<view class="date">{{item.created_at}}</view>
</view>
</view>
<van-empty description="暂无数据" wx:if="{{appraise_list_1.length == 0}}" />
<van-divider contentPosition="center" wx:if="{{appraise_list_1.length > 0 && current_page == last_page}}">到底了~</van-divider>
</van-tab>
<van-tab title="好评({{good_quantity}})" name="2">
<view class="item_list">
<view class="item" wx:for="{{appraise_list_2}}">
<view class="top">
<view class="name">{{item.name_mask}}</view>
<view class="start">
<t-rate value="{{item.avg_score}}" count="{{item.avg_score}}" color="#ED9C00"/>
</view>
</view>
<view class="content">{{item.content}}</view>
<view class="date">{{item.created_at}}</view>
</view>
</view>
<van-empty description="暂无数据" wx:if="{{appraise_list_2.length == 0}}" />
<van-divider contentPosition="center" wx:if="{{appraise_list_2.length > 0 && current_page == last_page}}">到底了~</van-divider>
</van-tab>
<van-tab title="中/差评({{bad_quantity}})" name="3">
<view class="item_list">
<view class="item" wx:for="{{appraise_list_3}}">
<view class="top">
<view class="name">{{item.name_mask}}</view>
<view class="start">
<t-rate value="{{item.avg_score}}" count="{{item.avg_score}}" color="#ED9C00"/>
</view>
</view>
<view class="content">{{item.content}}</view>
<view class="date">{{item.created_at}}</view>
</view>
</view>
<van-empty description="暂无数据" wx:if="{{appraise_list_3.length == 0}}" />
<van-divider contentPosition="center" wx:if="{{appraise_list_3.length > 0 && current_page == last_page}}">到底了~</van-divider>
</van-tab>
</van-tabs>
<!-- <t-tabs
defaultValue="{{1}}"
sticky
stickyProps="{{stickyProps}}"
@@ -49,5 +106,5 @@
</view>
<van-empty description="暂无数据" wx:if="{{appraise_list_3.length == 0}}" />
</t-tab-panel>
</t-tabs>
</t-tabs> -->
</view>
+38 -13
View File
@@ -4,22 +4,47 @@ page{
.container{
width: 100vw;
}
.t-tab-panel,.t-tabs__content {
background-color: #F6F6F6;
}
.t-tabs__item--active{
color: #49B9AD !important;
font-size: 32rpx !important;
}
.t-tabs__item-inner--line{
font-size: 28rpx !important;
}
.t-tabs__track{
background-color: var(--td-tab-track-color, var(--td-primary-color, #49B9AD)) !important;
}
.item_list{
width: 92vw;
margin: 20rpx auto;
background-color: #fff;
border-radius: 20rpx;
}
.item{
display: flex;
padding: 20rpx;
flex-direction: column;
}
.item:not(:last-child){
border-bottom: 1px solid #E7E7E7;
}
.top{
display: flex;
justify-content: space-between;
align-items: center;
flex: 1;
}
.name{
flex: 1;
font-size: 30rpx;
color: #666666;
}
.start{
flex: 1;
display: flex;
justify-content: flex-end;
}
.content{
flex: 2;
font-size: 34rpx;
color: #333333;
margin: 20rpx 0;
}
.date{
flex: 1;
font-size: 28rpx;
color: #666666;
}