ad.js 434 B

1234567891011121314151617181920212223242526
  1. const info = wx.getSystemInfoSync()
  2. Page({
  3. onShareAppMessage() {
  4. return {
  5. title: 'ad',
  6. path: 'packageComponent/pages/open/ad/ad'
  7. }
  8. },
  9. data: {
  10. theme: 'light',
  11. platform: info.platform
  12. },
  13. onLoad() {
  14. this.setData({
  15. theme: wx.getSystemInfoSync().theme || 'light'
  16. })
  17. if (wx.onThemeChange) {
  18. wx.onThemeChange(({theme}) => {
  19. this.setData({theme})
  20. })
  21. }
  22. }
  23. })