myFollow.js 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. // pages/myFollow/myFollow.js
  2. const api = require('../../api/index')
  3. Page({
  4. /**
  5. * 页面的初始数据
  6. */
  7. data: {
  8. queryParams:{
  9. current:1,
  10. size:10
  11. },
  12. total:0,
  13. tableData:[],
  14. checkList:[
  15. // {
  16. // type:0,
  17. // label:'全部',
  18. // icon:'',
  19. // checked:true
  20. // },
  21. {
  22. type:1,
  23. label:'白名单',
  24. icon:'myIconanquanbangzhu',
  25. checked:false
  26. },
  27. {
  28. type:2,
  29. label:'灰名单',
  30. icon:'myIcongroup43',
  31. checked:false
  32. },
  33. {
  34. type:4,
  35. label:'黑名单',
  36. icon:'myIconicon-test',
  37. checked:false
  38. },
  39. ],
  40. checked:[]
  41. },
  42. /**
  43. * 生命周期函数--监听页面加载
  44. */
  45. onLoad(options) {
  46. this.setData(
  47. {
  48. queryParams:{
  49. current:1,
  50. size:10
  51. },
  52. total:0
  53. }
  54. )
  55. this.getMyFollowProductList()
  56. },
  57. /**
  58. * 生命周期函数--监听页面初次渲染完成
  59. */
  60. onReady() {
  61. },
  62. /**
  63. * 生命周期函数--监听页面显示
  64. */
  65. onShow() {
  66. },
  67. /**
  68. * 页面功能
  69. */
  70. //获取关注的产品
  71. getMyFollowProductList(){},
  72. //加载更多
  73. loadMore(){
  74. var current = this.data.queryParams.current
  75. this.setData(
  76. {
  77. ['queryParams.current']:current+1
  78. }
  79. )
  80. this.getMyFollowProductList()
  81. },
  82. //获取筛选值
  83. onChange(e){
  84. var data = e.detail
  85. this.setData({
  86. checked: data,
  87. });
  88. this.getMyFollowProductList()
  89. },
  90. /**
  91. * 生命周期函数--监听页面隐藏
  92. */
  93. onHide() {
  94. },
  95. /**
  96. * 生命周期函数--监听页面卸载
  97. */
  98. onUnload() {
  99. },
  100. /**
  101. * 页面相关事件处理函数--监听用户下拉动作
  102. */
  103. onPullDownRefresh() {
  104. },
  105. /**
  106. * 页面上拉触底事件的处理函数
  107. */
  108. onReachBottom() {
  109. },
  110. /**
  111. * 用户点击右上角分享
  112. */
  113. onShareAppMessage() {
  114. }
  115. })