const util = require('../../../utils/util.js'); const app = getApp(); Page({ /** * 组件的初始数据 */ data: { orderSn:"", agentMoney:"", areaAgentMoney:"", storeCommission:"", list:[] }, onLoad: function (options) { this.setData({ orderSn:options.orderSn, agentMoney:options.agentMoney, areaAgentMoney:options.areaAgentMoney, storeCommission:options.storeCommission }) this.getOrderDetail(options.orderSn); }, getOrderDetail(){ var that = this; if(!that.data.orderSn){ return; } util.request(util.api.queryDetailListByOrderSn, {"orderSn":that.data.orderSn}, "GET", false, true, app.globalData.token).then((res) => { if (res.code == 200) { console.log(res) this.setData({ list:res.result, }) } }).catch((res) => {}) } })