exchangeList.js 705 B

12345678910111213141516171819202122232425262728293031323334353637
  1. //index.js
  2. //获取应用实例
  3. const app = getApp()
  4. Page({
  5. data: {
  6. exchangeList: [
  7. {
  8. type: '微信',
  9. number: '1200.00',
  10. create_time: '2020-12-12',
  11. status: '已处理',
  12. },
  13. ]
  14. },
  15. //提交
  16. onLoad: function () {
  17. let data = app.globalData.userInfo;
  18. wx.request({
  19. url: `${app.globalData.publicUrl}/api/htyd/cash?mobile=${data.mobile}`,
  20. success: res => {
  21. console.log(res);
  22. if (res.data.errcode == 0) {
  23. this.setData({ exchangeList: res.data.data })
  24. }
  25. },
  26. error: err => {
  27. wx.showToast({
  28. title: err.data.errmsg,
  29. icon: 'error'
  30. })
  31. }
  32. })
  33. },
  34. })