works.js 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. import httpRequestApi from '../../../utils/APIClient';
  2. Page({
  3. data: {
  4. fullScreenBtn: false,
  5. playBtn: false,
  6. gesture: true,
  7. user: [{
  8. nickName: '萝莉小猫咪',
  9. image: '../../../static/image/timg.jpg',
  10. },
  11. {
  12. nickName: '萝莉小猫咪',
  13. image: '../../../static/image/timg.jpg',
  14. },
  15. {
  16. nickName: '萝莉小猫咪',
  17. image: '../../../static/image/timg.jpg',
  18. },
  19. {
  20. nickName: '萝莉小猫咪',
  21. image: '../../../static/image/timg.jpg',
  22. },
  23. {
  24. nickName: '萝莉小猫咪',
  25. image: '../../../static/image/timg.jpg',
  26. },
  27. {
  28. nickName: '萝莉小猫咪',
  29. image: '../../../static/image/timg.jpg',
  30. },
  31. {
  32. nickName: '萝莉小猫咪',
  33. image: '../../../static/image/timg.jpg',
  34. },
  35. {
  36. nickName: '萝莉小猫咪',
  37. image: '../../../static/image/timg.jpg',
  38. },
  39. {
  40. nickName: '萝莉小猫咪',
  41. image: '../../../static/image/timg.jpg',
  42. },
  43. {
  44. nickName: '萝莉小猫咪',
  45. image: '../../../static/image/timg.jpg',
  46. },
  47. {
  48. nickName: '萝莉小猫咪',
  49. image: '../../../static/image/timg.jpg',
  50. },
  51. {
  52. nickName: '萝莉小猫咪',
  53. image: '../../../static/image/timg.jpg',
  54. }
  55. ],
  56. text: '总有一天我将实质性操作死去而你我的\xa0\xa0\xa0\xa0\xa0\xa0\xa0儿子自行车在啊实打实大苏打撒旦将加冕为王'
  57. },
  58. onLoad: function (option) {
  59. if (option.title) {
  60. wx.setNavigationBarTitle({
  61. title: option.title //页面标题为路由参数
  62. })
  63. this.setData({
  64. title: option.title,
  65. id: option.id
  66. })
  67. }
  68. let uid = 1;
  69. httpRequestApi.getWorksDetail(uid,option.id).success((res)=>{
  70. console.log(res);
  71. });
  72. },
  73. goToReading: function () {
  74. let id = this.data.id;
  75. let title = this.data.title;
  76. wx.navigateTo({
  77. url: `../../main/reading/reading?id=${id}&title=${title}`
  78. })
  79. }
  80. })