census.js 960 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. var app = getApp();
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. total_getorder_count: 0,
  8. system_send_ordercount: 0,
  9. has_send_count: 0,
  10. total_commiss_money: 0
  11. },
  12. /**
  13. * 生命周期函数--监听页面加载
  14. */
  15. onLoad: function (options) {
  16. },
  17. /**
  18. * 生命周期函数--监听页面显示
  19. */
  20. onShow: function () {
  21. this.getData();
  22. },
  23. getData: function () {
  24. let token = wx.getStorageSync('token');
  25. app.util.ProReq('localtown.get_distribution_statics', { token }).then(res => {
  26. console.log(res)
  27. let { total_getorder_count, system_send_ordercount, has_send_count, total_commiss_money } = res.data;
  28. this.setData({
  29. total_getorder_count, system_send_ordercount, has_send_count, total_commiss_money
  30. })
  31. }).catch(err => {
  32. console.log(err)
  33. app.util.message(err.msg || '请求出错', 'switchTo:/lionfish_comshop/pages/user/me', 'error');
  34. })
  35. }
  36. })