C端小程序
25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
825 B

  1. let Http = require('../../utils/http.js')
  2. let app = getApp()
  3. Page({
  4. data: {
  5. tabs: [{
  6. key: 0,
  7. name: "待付款"
  8. },
  9. {
  10. key: 1,
  11. name: "已支付"
  12. },
  13. {
  14. key: 2,
  15. name: "已取消"
  16. }
  17. ],
  18. list:[],
  19. current:'',
  20. current_scroll:'1'
  21. },
  22. onLoad() {
  23. },
  24. getList(key){
  25. Http.getResquest('/api/order/list', app.globalData.token, '加载中', {
  26. pageNum: 1,
  27. pageSize: 10,
  28. orderStatus: key
  29. }, (res) => {
  30. this.setData({
  31. list: res.data.list
  32. })
  33. console.log(res)
  34. })
  35. },
  36. handleChange({detail}) {
  37. this.setData({
  38. current: detail.key
  39. });
  40. },
  41. handleChangeScroll({detail}) {
  42. this.getList(detail.key)
  43. this.setData({
  44. current_scroll: detail.key
  45. });
  46. },
  47. })