app.js 646 B

12345678910111213141516171819202122232425262728293031
  1. const config = require('./config')
  2. const themeListeners = []
  3. global.isDemo = true
  4. App({
  5. onLaunch(opts, data) {
  6. console.log('App Launch', opts)
  7. if (data && data.path) {
  8. wx.navigateTo({
  9. url: data.path,
  10. })
  11. }
  12. if (!wx.cloud) {
  13. console.error('请使用 2.2.3 或以上的基础库以使用云能力')
  14. } else {
  15. wx.cloud.init({
  16. env: config.envId,
  17. traceUser: true,
  18. })
  19. }
  20. },
  21. onShow() {
  22. },
  23. onHide() {
  24. },
  25. globalData: {
  26. theme: wx.getSystemInfoSync().theme,
  27. hasLogin: false,
  28. openid: null,
  29. iconTabbar: '/page/weui/example/images/icon_tabbar.png',
  30. }
  31. })