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() { }, 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 }); }, })