balance-detail.js 767 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. Page({
  2. data: {
  3. balanceDetail: []
  4. },
  5. onLoad: function(e) {
  6. getApp().page.onLoad(this, e);
  7. var t = this;
  8. t.setData(e),
  9. getApp().core.showLoading({
  10. title: "加载中"
  11. }),
  12. getApp().request({
  13. url: getApp().api.balance.detail,
  14. method: "GET",
  15. data: {
  16. order_type: e.order_type,
  17. id: e.id
  18. },
  19. success: function(e) {
  20. getApp().core.hideLoading(),
  21. 0 == e.code ? t.setData({
  22. balanceDetail: e.data
  23. }) : getApp().core.showModal({
  24. title: "提示",
  25. content: e.msg
  26. })
  27. }
  28. })
  29. },
  30. onReady: function() {
  31. getApp().page.onReady(this)
  32. },
  33. onShow: function() {
  34. getApp().page.onShow(this)
  35. },
  36. onHide: function() {
  37. getApp().page.onHide(this)
  38. },
  39. onUnload: function() {
  40. getApp().page.onUnload(this)
  41. }
  42. });