classify_detail.js 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. // pages/classify_detail/classify_detail.js
  2. // const { http } = require('../../utils/util')
  3. const { getClassifyGoods } = require('../../API/classifyGoods')
  4. Page({
  5. /**
  6. * 页面的初始数据
  7. */
  8. data: {
  9. classifyShow: [],
  10. page: 1,
  11. pageSize: 6
  12. },
  13. /**
  14. * 生命周期函数--监听页面加载
  15. */
  16. onLoad(options) {
  17. this.getGoods()
  18. // console.log(options);
  19. // var id = options;
  20. },
  21. getGoods() {
  22. getClassifyGoods(this.data).then((res) => {
  23. console.log(res);
  24. })
  25. },
  26. /**
  27. * 生命周期函数--监听页面初次渲染完成
  28. */
  29. onReady() {
  30. },
  31. /**
  32. * 生命周期函数--监听页面显示
  33. */
  34. onShow() {
  35. },
  36. /**
  37. * 生命周期函数--监听页面隐藏
  38. */
  39. onHide() {
  40. },
  41. /**
  42. * 生命周期函数--监听页面卸载
  43. */
  44. onUnload() {
  45. },
  46. /**
  47. * 页面相关事件处理函数--监听用户下拉动作
  48. */
  49. onPullDownRefresh() {
  50. },
  51. /**
  52. * 页面上拉触底事件的处理函数
  53. */
  54. onReachBottom() {
  55. },
  56. /**
  57. * 用户点击右上角分享
  58. */
  59. onShareAppMessage() {
  60. }
  61. })