index.js 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. const util = require('../../../utils/util.js');
  2. const app = getApp();
  3. Page({
  4. /**
  5. * 组件的初始数据
  6. */
  7. data: {
  8. orderSn:"",
  9. agentMoney:"",
  10. areaAgentMoney:"",
  11. storeCommission:"",
  12. list:[]
  13. },
  14. onLoad: function (options) {
  15. this.setData({
  16. orderSn:options.orderSn,
  17. agentMoney:options.agentMoney,
  18. areaAgentMoney:options.areaAgentMoney,
  19. storeCommission:options.storeCommission
  20. })
  21. this.getOrderDetail(options.orderSn);
  22. },
  23. getOrderDetail(){
  24. var that = this;
  25. if(!that.data.orderSn){
  26. return;
  27. }
  28. util.request(util.api.queryDetailListByOrderSn, {"orderSn":that.data.orderSn}, "GET", false, true, app.globalData.token).then((res) => {
  29. if (res.code == 200) {
  30. console.log(res)
  31. this.setData({
  32. list:res.result,
  33. })
  34. }
  35. }).catch((res) => {})
  36. }
  37. })