武田小程序
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.

77 lines
1.3 KiB

const app = getApp<IAppOption>();
Page({
data: {
feedbackTimeBegin: "",
feedbackTimeEnd: "",
status: [
{
id: "0",
value: "待审核",
},
{
id: "1",
value: "审核通过",
},
{
id: "2",
value: "审核驳回",
},
],
auditStatus: "",
4 months ago
list: [],
pagination: {
page: 1,
pages: 1,
count: 1,
},
},
onLoad() {
app.waitLogin().then(() => {
4 months ago
this.getList();
});
},
handleStatus(e) {
this.setData({
auditStatus: e.detail.value,
});
this.getList();
},
onClose() {
this.setData({
auditStatus: "",
});
this.getList();
},
4 months ago
getList(newPage = 1) {
wx.ajax({
method: "GET",
4 months ago
url: "?r=takeda/doctor/apply-list",
data: {
page: newPage,
auditStatus: this.data.auditStatus || -1,
4 months ago
},
}).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 {};