This commit is contained in:
haomingming
2023-04-11 18:41:46 +08:00
parent 3f40c4c237
commit 4f14aad6f3
53 changed files with 657 additions and 205 deletions
+6 -7
View File
@@ -36,7 +36,7 @@ Page({
onReachBottom() {
console.log('===触底了!!===');
if(this.data.current_page < this.data.last_page){//最后一页时停止分页
this.getDoctorEvaluationList()
this.getDoctorEvaluationList(this.data.evaluation_type)
}
},
onLoad(option){
@@ -48,7 +48,7 @@ Page({
},
onShow(){
console.log("onShow");
this.getDoctorEvaluationList();
this.getDoctorEvaluationList(1);
},
onTabsChange(e){
console.log(e);
@@ -59,18 +59,17 @@ Page({
last_page: 0,
[list_name]: []
})
this.getDoctorEvaluationList()
this.getDoctorEvaluationList(e.detail.name)
},
getDoctorEvaluationList(){
getDoctorEvaluationList(evaluation_type){
//获取评价列表
let params = {};
params.page = this.data.current_page + 1;
params.doctor_id = this.data.doctor_id;
params.evaluation_type = this.data.evaluation_type;
params.evaluation_type = evaluation_type;
api.getDoctorEvaluation(params).then(response => {
console.log(response);
if(response.data.total > 0){
let list_name = "appraise_list_" + this.data.evaluation_type;
let list_name = "appraise_list_" + evaluation_type;
console.log(list_name);
let apprise_list = this.data[list_name];
this.setData({
-1
View File
@@ -9,6 +9,5 @@
"t-rate": "tdesign-miniprogram/rate/rate",
"van-divider": "@vant/weapp/divider/index"
},
"enablePullDownRefresh": true,
"onReachBottomDistance": 100
}