product.js 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. // pages/productinfo/productinfo.js
  2. Page({
  3. /**
  4. * 页面的初始数据
  5. */
  6. data: {
  7. productinfo:{
  8. title:"葛优躺(北京躺)电影足疗",
  9. price:"666",
  10. commentsList:[]
  11. }
  12. },
  13. /**
  14. * 生命周期函数--监听页面加载
  15. */
  16. onLoad: function (options) {
  17. var list = [{
  18. id: 1,
  19. headImg: "../../images/headImg.jpg",
  20. product: "葛优躺(北京躺)电影足疗",
  21. assessDate: "2020-02-02",
  22. stars: 5,
  23. comments: {
  24. content: "3号技师特别好~~~赞一个,下次还来。",
  25. imgs: [{
  26. imgurl: "../../images/commentsImg01.jpg"
  27. },
  28. {
  29. imgurl: "../../images/commentsImg02.jpg"
  30. },
  31. {
  32. imgurl: "../../images/commentsImg03.jpg"
  33. },
  34. {
  35. imgurl: "../../images/commentsImg03.jpg"
  36. },
  37. {
  38. imgurl: "../../images/commentsImg02.jpg"
  39. },
  40. {
  41. imgurl: "../../images/commentsImg01.jpg"
  42. },
  43. {
  44. imgurl: "../../images/commentsImg02.jpg"
  45. },
  46. {
  47. imgurl: "../../images/commentsImg01.jpg"
  48. },
  49. {
  50. imgurl: "../../images/commentsImg03.jpg"
  51. },
  52. ]
  53. }
  54. }, {
  55. id: 2,
  56. headImg: "../../images/headImg.jpg",
  57. product: "葛优躺(北京躺)电影足疗",
  58. assessDate: "2020-02-02",
  59. stars: 5,
  60. comments: {
  61. content: "3号技师特别好~~~赞一个,下次还来。",
  62. imgs: [{
  63. imgurl: "../../images/commentsImg01.jpg"
  64. },
  65. ]
  66. }
  67. }, {
  68. id: 3,
  69. headImg: "../../images/headImg.jpg",
  70. product: "葛优躺(北京躺)电影足疗",
  71. assessDate: "2020-02-02",
  72. stars: 4,
  73. comments: {
  74. content: "3号技师特别好~~~赞一个,下次还来。",
  75. imgs: []
  76. }
  77. }, {
  78. id: 4,
  79. headImg: "../../images/headImg.jpg",
  80. product: "葛优躺(北京躺)电影足疗",
  81. assessDate: "2020-02-02",
  82. stars: 5,
  83. comments: {
  84. content: "3号技师特别好~~~赞一个,下次还来。",
  85. imgs: [{
  86. imgurl: "../../images/commentsImg01.jpg"
  87. },
  88. {
  89. imgurl: "../../images/commentsImg02.jpg"
  90. },
  91. {
  92. imgurl: "../../images/commentsImg01.jpg"
  93. },
  94. {
  95. imgurl: "../../images/commentsImg03.jpg"
  96. },
  97. ]
  98. }
  99. }, {
  100. id: 5,
  101. headImg: "../../images/headImg.jpg",
  102. product: "葛优躺(北京躺)电影足疗",
  103. assessDate: "2020-02-02",
  104. stars: 5,
  105. comments: {
  106. content: "3号技师特别好~~~赞一个,下次还来。",
  107. imgs: [{
  108. imgurl: "../../images/commentsImg01.jpg"
  109. },
  110. {
  111. imgurl: "../../images/commentsImg02.jpg"
  112. },
  113. {
  114. imgurl: "../../images/commentsImg03.jpg"
  115. },
  116. {
  117. imgurl: "../../images/commentsImg02.jpg"
  118. },
  119. {
  120. imgurl: "../../images/commentsImg01.jpg"
  121. },
  122. ]
  123. }
  124. }];
  125. this.setData({
  126. // id: options.id,
  127. commentsList: list,
  128. })
  129. },
  130. /**
  131. * 生命周期函数--监听页面初次渲染完成
  132. */
  133. onReady: function () {
  134. },
  135. /**
  136. * 生命周期函数--监听页面显示
  137. */
  138. onShow: function () {
  139. },
  140. /**
  141. * 生命周期函数--监听页面隐藏
  142. */
  143. onHide: function () {
  144. },
  145. /**
  146. * 生命周期函数--监听页面卸载
  147. */
  148. onUnload: function () {
  149. },
  150. /**
  151. * 页面相关事件处理函数--监听用户下拉动作
  152. */
  153. onPullDownRefresh: function () {
  154. },
  155. /**
  156. * 页面上拉触底事件的处理函数
  157. */
  158. onReachBottom: function () {
  159. },
  160. /**
  161. * 用户点击右上角分享
  162. */
  163. onShareAppMessage: function () {
  164. }
  165. })