<style>
  page {
    font-family: 'PingFangSC-Regular',monospace;
    width:100%;
    height:100%;
    background-color:#F1F1F1;
  }
</style>
<script>
import wepy from '@wepy/core';
import vuex from '@wepy/x';
import promisify from '@wepy/use-promisify';

wepy.use(promisify);
wepy.use(vuex);

wepy.app({
  hooks: {
    // App 级别 hook，对整个 App 生效
    // 同时存在 Page hook 和 App hook 时，优先执行 Page hook，返回值再交由 App hook 处
  },
  globalData: {
    statusBarHeight: ''
  },
  async onLaunch() {
    let that = this;
    wx.getSystemInfo({
      success: function (res) {
        that.$options.globalData.statusBarHeight = res.statusBarHeight;
      }
    });
    wx.setStorageSync('onNetworkStatusChange', true);
    wx.onNetworkStatusChange((res) => {
      wx.setStorageSync('onNetworkStatusChange', res.isConnected);
    });
  },
  onError(e) {
    console.log('onError', e);
  },
  methods: {}
});
</script>
<config>
{
    pages: [
      'pages/index',
      'pages/raffle',
      'pages/prize',
      'pages/myraffles',
      'pages/help',
      'pages/morehelp',
    ],
    window: {
      backgroundTextStyle: 'light',
      navigationBarBackgroundColor: '#f1f1f1',
      navigationBarTitleText: 'WeChat',
      navigationBarTextStyle: 'black'
    }
}
</config>
