navigate.js 475 B

123456789101112131415161718192021222324252627
  1. Page({
  2. data: {
  3. theme: 'light'
  4. },
  5. onShareAppMessage() {
  6. return {
  7. title: 'navigatePage',
  8. path: 'packageComponent/pages/nav/navigator/navigate'
  9. }
  10. },
  11. onLoad(options) {
  12. this.setData({
  13. theme: wx.getSystemInfoSync().theme || 'light'
  14. })
  15. if (wx.onThemeChange) {
  16. wx.onThemeChange(({theme}) => {
  17. this.setData({theme})
  18. })
  19. }
  20. console.log(options)
  21. this.setData({
  22. title: options.title
  23. })
  24. }
  25. })