let Http = require('../../../utils/http.js') let app = getApp() Page({ data: { tabs: [{ key: 0, name: "全部" }, { key: 1, name: "待付款" }, { key: 2, name: "已完成" } ], list: [], current: '', current_scroll: '1' }, onLoad(e) { this.getList(e.id) this.setData({ current_scroll: e.id }); }, getList(key) { Http.getResquest('/api/order/list', app.globalData.token, '加载中', { pageNum: 1, pageSize: 10, orderStatus: key }, (res) => { this.setData({ list: res.data.list }) console.log(res) }) }, handleChange({ detail }) { this.setData({ current: detail.key }); }, handleChangeScroll({ detail }) { this.getList(detail.key) this.setData({ current_scroll: detail.key }); }, })