const { globalData: { util: { api: { myReservation: url } } } } = getApp(), tab = { request: { type: 'get_auth', url }, template: "reservation", items: ['已预约', '已取消', '已失约', '已完结'].map((title, i) => ({ title, param: { reservationState: ++i } })) }; Page({ onShow() { this.setData({ tab }) } })