C端小程序
Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

104 Zeilen
2.1 KiB

  1. // pages/index/sw/index.js
  2. Component({
  3. /**
  4. * 组件的属性列表
  5. */
  6. properties: {
  7. },
  8. /**
  9. * 组件的初始数据
  10. */
  11. data: {
  12. tabs: [
  13. {
  14. key: 1,
  15. name: "全部"
  16. },
  17. {
  18. key: 2,
  19. name: "餐饮"
  20. },
  21. {
  22. key: 3,
  23. name: "娱乐"
  24. }, {
  25. key: 4,
  26. name: "服饰"
  27. }, {
  28. key: 5,
  29. name: "超市"
  30. },
  31. {
  32. key: 6,
  33. name: "亲子"
  34. }, {
  35. key: 7,
  36. name: "其他"
  37. },
  38. ],
  39. list: [
  40. {
  41. img: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg",
  42. name: "海鲜焗饭",
  43. distance: "12.5km",
  44. address: "西单大悦城2F-012A",
  45. oPrice: "59.00",
  46. pPrice: "1.00",
  47. },
  48. {
  49. img: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg",
  50. name: "海鲜焗饭",
  51. distance: "12.5km",
  52. address: "西单大悦城2F-012A",
  53. oPrice: "59.00",
  54. pPrice: "1.00",
  55. },
  56. {
  57. img: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg",
  58. name: "海鲜焗饭",
  59. distance: "12.5km",
  60. address: "西单大悦城2F-012A",
  61. oPrice: "59.00",
  62. pPrice: "1.00",
  63. },
  64. {
  65. img: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg",
  66. name: "海鲜焗饭",
  67. distance: "12.5km",
  68. address: "西单大悦城2F-012A",
  69. oPrice: "59.00",
  70. pPrice: "1.00",
  71. },
  72. {
  73. img: "http://img02.tooopen.com/images/20150928/tooopen_sy_143912755726.jpg",
  74. name: "海鲜焗饭",
  75. distance: "12.5km",
  76. address: "西单大悦城2F-012A",
  77. oPrice: "59.00",
  78. pPrice: "1.00",
  79. },
  80. ],
  81. current: '1',
  82. current_scroll: '1',
  83. },
  84. /**
  85. * 组件的方法列表
  86. */
  87. methods: {
  88. handleChange({ detail }) {
  89. this.setData({
  90. current: detail.key
  91. });
  92. },
  93. handleChangeScroll({ detail }) {
  94. this.setData({
  95. current_scroll: detail.key
  96. });
  97. },
  98. }
  99. })