fine.js 919 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. var app = getApp()
  2. Page({
  3. data: {
  4. arr:[]
  5. },
  6. onLoad: function (options) {
  7. },
  8. detail(e){
  9. wx.navigateTo({
  10. url: '../fine_detail/fine_detail?no='+e.currentTarget.dataset.id,
  11. })
  12. },
  13. onReady: function () {
  14. },
  15. onShow: function () {
  16. var that = this;
  17. wx.showLoading({
  18. title: '加载中...',
  19. })
  20. app.request('/punishment_orders', '', 'GET').then(res => {
  21. if (res.statusCode == 200) {
  22. console.log(res)
  23. if(res.data.data!=''){
  24. that.setData({
  25. arr:res.data.data
  26. })
  27. }else{
  28. that.setData({
  29. arr:''
  30. })
  31. }
  32. }
  33. wx.hideLoading({
  34. complete: (res) => {},
  35. })
  36. })
  37. },
  38. onHide: function () {
  39. },
  40. onUnload: function () {
  41. },
  42. onPullDownRefresh: function () {
  43. },
  44. onReachBottom: function () {
  45. },
  46. onShareAppMessage: function () {
  47. }
  48. })