cloud-file-component.js 555 B

123456789101112131415161718192021222324252627
  1. const {demoImageFileId, demoVideoFileId} = require('../../../../config')
  2. Page({
  3. onShareAppMessage() {
  4. return {
  5. title: '组件支持',
  6. path: 'packageCloud/pages/storage/cloud-file-component/cloud-file-component'
  7. }
  8. },
  9. data: {
  10. theme: 'light',
  11. imageFileId: demoImageFileId,
  12. videoFileId: demoVideoFileId
  13. },
  14. onLoad() {
  15. this.setData({
  16. theme: wx.getSystemInfoSync().theme || 'light'
  17. })
  18. if (wx.onThemeChange) {
  19. wx.onThemeChange(({theme}) => {
  20. this.setData({theme})
  21. })
  22. }
  23. }
  24. })