import api from '../../api/api' Page({ data: { param: { "id": "20230206091503", "version": 1, "content": { "pageSize": 20, "pageNumber": 1, "sys_enterpriseid": 0 } }, list: [] }, async listData() { const res = await api._post(this.data.param) if (res.data.length > 0) { this.setData({ list: this.data.list.concat(res.data) }) } else { getApp().globalData.Language.showToast('没有更多了!') } }, onClick(data) { let item = data.currentTarget.dataset.item let form = getApp().globalData.formData form.data.formLayoutData.formInfo.forEach(e => { if (e.id === 'sa_orderid') { e.inputValue = item.sa_orderid } }) form.setData({ formLayoutData: form.data.formLayoutData }) wx.navigateBack({ delta: 0 }) }, onLoad(options) { let that = this let form = getApp().globalData.formData form.data.formLayoutData.formInfo.forEach(e => { if (e.id === 'sys_enterpriseid') { that.data.param.content.sys_enterpriseid = e.inputValue } }) this.listData() this.setData({ loadingTexts: ['下拉刷新', '松手刷新', '正在刷新', '刷新完成'].map(v => getApp().globalData.Language.getMapText(v)) }) getApp().globalData.Language.getLanguagePackage(this, 'E-订单'); }, onPullDownRefresh() { this.data.list = [] this.data.param.content.pageNumber = 1 this.listData() }, onReachBottom() { this.data.param.content.pageNumber++ this.listData() }, })