index.js 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // pages/tables/index.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. list: [{
  8. id: 1,
  9. name: '1号桌',
  10. status: '1', // 1 就餐 0 空闲
  11. },{
  12. id: 2,
  13. name: '2号桌',
  14. status: '0', // 1 就餐 0 空闲
  15. },{
  16. id: 3,
  17. name: '3号桌',
  18. status: '1', // 1 就餐 0 空闲
  19. },{
  20. id: 3,
  21. name: '3号桌',
  22. status: '4', // 1 就餐 0 空闲
  23. }]
  24. },
  25. goStore(e) {
  26. console.log(e);
  27. var item = e.currentTarget.dataset.item;
  28. wx.navigateTo({
  29. url: '/pages/goods/index?'+'tableId='+item.id
  30. });
  31. },
  32. /**
  33. * 生命周期函数--监听页面加载
  34. */
  35. onLoad(options) {
  36. },
  37. /**
  38. * 生命周期函数--监听页面初次渲染完成
  39. */
  40. onReady() {
  41. },
  42. /**
  43. * 生命周期函数--监听页面显示
  44. */
  45. onShow() {
  46. },
  47. /**
  48. * 生命周期函数--监听页面隐藏
  49. */
  50. onHide() {
  51. },
  52. /**
  53. * 生命周期函数--监听页面卸载
  54. */
  55. onUnload() {
  56. },
  57. /**
  58. * 页面相关事件处理函数--监听用户下拉动作
  59. */
  60. onPullDownRefresh() {
  61. },
  62. /**
  63. * 页面上拉触底事件的处理函数
  64. */
  65. onReachBottom() {
  66. },
  67. /**
  68. * 用户点击右上角分享
  69. */
  70. onShareAppMessage() {
  71. }
  72. })