unboxing.js 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. Page({
  2. data:{
  3. comment: [
  4. {
  5. userHadeUrl: "../../images/user.png",
  6. userName: "用户123123123",
  7. title: "这里是一级标题111",
  8. goodsInfo: "商品介绍信息111",
  9. price: "110.3",
  10. text: "这是一段关于商品的评价111,这是一段关于商品的评价111,这是一段关于商品的评价111,这是一段关于商品的评价111。",
  11. userImages: ["https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800630032&di=a26a076dc1d206187436adb85b572004&imgtype=0&src=http%3A%2F%2Fimg1.gtimg.com%2F17%2F1770%2F177026%2F17702611_980x1200_0.jpg", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800724111&di=33be87fd23df4cfae157d27567bf562f&imgtype=0&src=http%3A%2F%2Fpic29.nipic.com%2F20130602%2F7447430_190044343000_2.jpg", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800753375&di=6bd17b6e2700cd0479d27faf4ad829b9&imgtype=0&src=http%3A%2F%2Fimg01.taopic.com%2F160911%2F267838-160911111J573.jpg"],
  12. releaseTime: "2018-06-20 15:11",
  13. id: 0
  14. },
  15. {
  16. userHadeUrl: "../../images/user.png",
  17. userName: "用户456456456",
  18. title: "这里是一级标题222",
  19. goodsInfo: "商品介绍信息222",
  20. price: "188.5",
  21. text: "这是一段关于商品的评价222,这是一段关于商品的评价222,这是一段关于商品的评价222,这是一段关于商品的评价222。",
  22. userImages: ["https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800630032&di=a26a076dc1d206187436adb85b572004&imgtype=0&src=http%3A%2F%2Fimg1.gtimg.com%2F17%2F1770%2F177026%2F17702611_980x1200_0.jpg", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800724111&di=33be87fd23df4cfae157d27567bf562f&imgtype=0&src=http%3A%2F%2Fpic29.nipic.com%2F20130602%2F7447430_190044343000_2.jpg", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800753375&di=6bd17b6e2700cd0479d27faf4ad829b9&imgtype=0&src=http%3A%2F%2Fimg01.taopic.com%2F160911%2F267838-160911111J573.jpg"],
  23. releaseTime: "2018-06-19 14:11",
  24. id: 1
  25. },
  26. {
  27. userHadeUrl: "../../images/user.png",
  28. userName: "用户789789789",
  29. title: "这里是一级标题333",
  30. goodsInfo: "商品介绍信息333",
  31. price: "110.3",
  32. text: "这是一段关于商品的评价333,这是一段关于商品的评价333,这是一段关于商品的评价333,这是一段关于商品的评价333。",
  33. userImages: ["https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800630032&di=a26a076dc1d206187436adb85b572004&imgtype=0&src=http%3A%2F%2Fimg1.gtimg.com%2F17%2F1770%2F177026%2F17702611_980x1200_0.jpg", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800724111&di=33be87fd23df4cfae157d27567bf562f&imgtype=0&src=http%3A%2F%2Fpic29.nipic.com%2F20130602%2F7447430_190044343000_2.jpg", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800753375&di=6bd17b6e2700cd0479d27faf4ad829b9&imgtype=0&src=http%3A%2F%2Fimg01.taopic.com%2F160911%2F267838-160911111J573.jpg"],
  34. releaseTime: "2018-06-18 13:11",
  35. id: 2
  36. },
  37. {
  38. userHadeUrl: "../../images/user.png",
  39. userName: "用户147147147",
  40. title: "这里是一级标题444",
  41. goodsInfo: "商品介绍信息444",
  42. price: "110.3",
  43. text: "这是一段关于商品的评价444,这是一段关于商品的评价444,这是一段关于商品的评价444,这是一段关于商品的评价444。",
  44. userImages: ["https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800630032&di=a26a076dc1d206187436adb85b572004&imgtype=0&src=http%3A%2F%2Fimg1.gtimg.com%2F17%2F1770%2F177026%2F17702611_980x1200_0.jpg", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800724111&di=33be87fd23df4cfae157d27567bf562f&imgtype=0&src=http%3A%2F%2Fpic29.nipic.com%2F20130602%2F7447430_190044343000_2.jpg", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800753375&di=6bd17b6e2700cd0479d27faf4ad829b9&imgtype=0&src=http%3A%2F%2Fimg01.taopic.com%2F160911%2F267838-160911111J573.jpg"],
  45. releaseTime: "2018-06-17 12:11",
  46. id: 3
  47. },
  48. {
  49. userHadeUrl: "../../images/user.png",
  50. userName: "用户258258258",
  51. title: "这里是一级标题555",
  52. goodsInfo: "商品介绍信息555",
  53. price: "110.3",
  54. text: "这是一段关于商品的评价555,这是一段关于商品的评价555,这是一段关于商品的评价555,这是一段关于商品的评价555。",
  55. userImages: ["https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800630032&di=a26a076dc1d206187436adb85b572004&imgtype=0&src=http%3A%2F%2Fimg1.gtimg.com%2F17%2F1770%2F177026%2F17702611_980x1200_0.jpg", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800724111&di=33be87fd23df4cfae157d27567bf562f&imgtype=0&src=http%3A%2F%2Fpic29.nipic.com%2F20130602%2F7447430_190044343000_2.jpg", "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1528800753375&di=6bd17b6e2700cd0479d27faf4ad829b9&imgtype=0&src=http%3A%2F%2Fimg01.taopic.com%2F160911%2F267838-160911111J573.jpg"],
  56. releaseTime: "2018-06-16 11:11",
  57. id: 4
  58. }
  59. ]
  60. },
  61. imgClickShow:function(e){
  62. var imgIndex = e.currentTarget.dataset.index;
  63. var selectIndex = e.currentTarget.dataset.select;
  64. var userImages = this.data.comment[selectIndex].userImages;
  65. wx.previewImage({
  66. current:userImages[imgIndex],
  67. urls:userImages,
  68. success:function(a,b,c){
  69. }
  70. })
  71. }
  72. })