武田小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
853 B

const app = getApp<IAppOption>();
Page({
data: {
feedbackTimeBegin: "",
feedbackTimeEnd: "",
4 months ago
list: [],
pagination: {
page: 1,
pages: 1,
count: 1,
},
},
onLoad() {
app.waitLogin().then(() => {
4 months ago
this.getList();
});
},
4 months ago
getList(newPage = 1) {
wx.ajax({
method: "GET",
4 months ago
url: "?r=takeda/doctor/apply-list",
data: {
page: newPage,
},
}).then((res) => {
4 months ago
const list = res.page === 1 ? res.list : [...this.data.list, ...res.list];
this.setData({
4 months ago
list,
pagination: {
page: res.page,
pages: res.pages,
count: res.count,
},
});
});
},
4 months ago
onReachBottom() {
const { page, pages } = this.data.pagination;
if (pages > page) {
this.getList(page + 1);
}
},
});
export {};