works.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. Page({
  2. data: {
  3. fullScreenBtn: false,
  4. playBtn: false,
  5. gesture: true,
  6. user: [{
  7. nickName: '萝莉小猫咪',
  8. image: '../../../static/image/timg.jpg',
  9. },
  10. {
  11. nickName: '萝莉小猫咪',
  12. image: '../../../static/image/timg.jpg',
  13. },
  14. {
  15. nickName: '萝莉小猫咪',
  16. image: '../../../static/image/timg.jpg',
  17. },
  18. {
  19. nickName: '萝莉小猫咪',
  20. image: '../../../static/image/timg.jpg',
  21. },
  22. {
  23. nickName: '萝莉小猫咪',
  24. image: '../../../static/image/timg.jpg',
  25. },
  26. {
  27. nickName: '萝莉小猫咪',
  28. image: '../../../static/image/timg.jpg',
  29. },
  30. {
  31. nickName: '萝莉小猫咪',
  32. image: '../../../static/image/timg.jpg',
  33. }
  34. ]
  35. },
  36. onLoad: function (option) {
  37. if (option.title) {
  38. wx.setNavigationBarTitle({
  39. title: option.title //页面标题为路由参数
  40. })
  41. this.setData({
  42. title: option.title,
  43. id: option.id
  44. })
  45. }
  46. },
  47. goToReading: function () {
  48. let id = this.data.id;
  49. let title = this.data.title;
  50. wx.navigateTo({
  51. url: `../../main/reading/reading?id=${id}&title=${title}`
  52. })
  53. }
  54. })